Back again,
I posted a question similar to this yesterday, however all the vendors had there own tables, and since I plan on this database being expandable, the design had to change.
So now I have all my vendors in a single table (as suggested), but I need to know how to create a dynamic field in VBA or maybe SQL if possible.
I'm a complete amateur when it comes to VBA and SQL, I've just started learning about databases for about two weeks, so I'm not sure where else to start. If you see something off or messy/unorganized, please tell me.
In this table, called "AllVendors ", I have a several fields named: [VENDOR 1], [VENDOR 2], [VENDOR 3], [VENDOR 4] and [VENDOR 5].
I need a module that will look at the field called [VENDOR 1] and take whatever's in there and check the field, in the same table, [(whatever [VENDOR 1] is) CAN SHIP SAME DAY].
If the field says "Yes" then it will update the blank field [VendorOrder], again all in the same table, to say "(whatever is in [VENDOR 1]).
If the field says "No" then it will move on to [VENDOR 2] and so on...
To rephrase, I need this module to check a table named [AllVendors] and inside this table, look for a field named [VENDOR 1] and let's say inside [VENDOR 1] it says "ASDF".
The module will then search for a field in the same table named [ASDF CAN SHIP SAME DAY].
Inside this field, the module will check if the cell says "Yes".
If it does say "Yes", it will update the field [VendorOrder] to say "ASDF".
If inside the field [ASDF CAN SHIP SAME DAY] it says "No", the module will look at the [VENDOR 2] field and take the vendor inside there, let's say it is "HJKL".
Now the module will look for the field named [HJKL CAN SHIP SAME DAY] and if it says "Yes", add the value "HJKL" to the field named [VendorOrder].
If, however, [HJKL CAN SHIP SAME DAY] says "No", the module will look at [VENDOR 3].
This cycle will repeat until [(whatever the vendor is) CAN SHIP SAME DAY] says "Yes" or when the process reaches [VENDOR 5].
Thanks for any advice or comments
I posted a question similar to this yesterday, however all the vendors had there own tables, and since I plan on this database being expandable, the design had to change.
So now I have all my vendors in a single table (as suggested), but I need to know how to create a dynamic field in VBA or maybe SQL if possible.
I'm a complete amateur when it comes to VBA and SQL, I've just started learning about databases for about two weeks, so I'm not sure where else to start. If you see something off or messy/unorganized, please tell me.
In this table, called "AllVendors ", I have a several fields named: [VENDOR 1], [VENDOR 2], [VENDOR 3], [VENDOR 4] and [VENDOR 5].
I need a module that will look at the field called [VENDOR 1] and take whatever's in there and check the field, in the same table, [(whatever [VENDOR 1] is) CAN SHIP SAME DAY].
If the field says "Yes" then it will update the blank field [VendorOrder], again all in the same table, to say "(whatever is in [VENDOR 1]).
If the field says "No" then it will move on to [VENDOR 2] and so on...
To rephrase, I need this module to check a table named [AllVendors] and inside this table, look for a field named [VENDOR 1] and let's say inside [VENDOR 1] it says "ASDF".
The module will then search for a field in the same table named [ASDF CAN SHIP SAME DAY].
Inside this field, the module will check if the cell says "Yes".
If it does say "Yes", it will update the field [VendorOrder] to say "ASDF".
If inside the field [ASDF CAN SHIP SAME DAY] it says "No", the module will look at the [VENDOR 2] field and take the vendor inside there, let's say it is "HJKL".
Now the module will look for the field named [HJKL CAN SHIP SAME DAY] and if it says "Yes", add the value "HJKL" to the field named [VendorOrder].
If, however, [HJKL CAN SHIP SAME DAY] says "No", the module will look at [VENDOR 3].
This cycle will repeat until [(whatever the vendor is) CAN SHIP SAME DAY] says "Yes" or when the process reaches [VENDOR 5].
Thanks for any advice or comments
Comment