I approach this knowligarchy as a wretched and humble supplicant, a beginner Access user who has hit that first brick wall that no amount of googling and tutorials appear to be able to help me over. It is probably, hopefully, a fairly simple question - but I'm stumped. I have attempted to translate my question into the idiom of "the small business" which seems ubiquitous in internet Access tutorials.
Say I have two tables: [customerorder] and [tariffs].
A record in [customerorder] comprises information about a customer and their current order, each record has a manually entered "order date" and a "tariff" that (with your help) should allow an Access query to calculate a "delivery date".
Each available "tariff" is listed in the [tariffs] table along with a number of other fields representing the various characteristics of that tariff - one of which is the field "delivery time". For some tariffs the delivery time is expressed in hours, some days and some months.
The master form is set up to allow users to manually enter data for records in [customerorder], with the exception of a "tariff" field which has a combo box listing the various records in [tariffs] as its control source.
How do I set up a query which calculates a "delivery date" and either stores this value in a new field in [customerorder] or at least links that value to the appropriate record in [customeroder]?
I have tried and failed in several ways. The one I was most hopeful about was expressing the "delivery time" field in [tariffs] as argument to a DateAdd expression e.g. (d, 27, [customerorder].[order date]) for tariff 1, (m, 6, [customerorder].[order date]) for tariff 2 etc... Then phrasing a query in terms of deliverydate: DateAdd[tariffs].[delivery time] - no dice.
It seems like it should be a very simply concept, but none of the primers on queries I've found have led to anything but error messages, perhaps a fundamental misunderstanding of relational databases and query structure is the problem. I would be very grateful to know the answer.
Thanks for your patience.
Say I have two tables: [customerorder] and [tariffs].
A record in [customerorder] comprises information about a customer and their current order, each record has a manually entered "order date" and a "tariff" that (with your help) should allow an Access query to calculate a "delivery date".
Each available "tariff" is listed in the [tariffs] table along with a number of other fields representing the various characteristics of that tariff - one of which is the field "delivery time". For some tariffs the delivery time is expressed in hours, some days and some months.
The master form is set up to allow users to manually enter data for records in [customerorder], with the exception of a "tariff" field which has a combo box listing the various records in [tariffs] as its control source.
How do I set up a query which calculates a "delivery date" and either stores this value in a new field in [customerorder] or at least links that value to the appropriate record in [customeroder]?
I have tried and failed in several ways. The one I was most hopeful about was expressing the "delivery time" field in [tariffs] as argument to a DateAdd expression e.g. (d, 27, [customerorder].[order date]) for tariff 1, (m, 6, [customerorder].[order date]) for tariff 2 etc... Then phrasing a query in terms of deliverydate: DateAdd[tariffs].[delivery time] - no dice.
It seems like it should be a very simply concept, but none of the primers on queries I've found have led to anything but error messages, perhaps a fundamental misunderstanding of relational databases and query structure is the problem. I would be very grateful to know the answer.
Thanks for your patience.