filtering date input

roosn

Registered User.
Local time
Today, 04:22
Joined
Jul 29, 2005
Messages
121
i am trying to build a marine turbine and parts log and have a problem in satisfying a working rule.

i have 2 tables which i have attached,

table 1 shows the on / off dates that a generator was fitted to a turbine

table 2 shows a general date history of the generator, when it had checks done, fitted, etc

what i would like to do is fit the generator again to another turbine

using a continous form to show the available dates in table 2, i would NOT like to see the dates during the period when the generator was fitted previously as shown in the on / off the dates in table 1.

the working rule being that a generator can not be fitted to 2 different turbines at the same time

can anybody point me in the right direction or assist in how i can overcome this problem

many thanks in advance for help provided
 

Attachments

  • table1.jpg
    table1.jpg
    14.1 KB · Views: 128
  • table2.jpg
    table2.jpg
    27.1 KB · Views: 122
hi -

First thing that comes to my mind: use a query that determines the most recent "fit date" (probably the maximum of the date field).

Use that query to filter the records where the information > max "fit date"

Build your form on the 2nd query.

Let me know if that isn't helpful.
 
hi gromit thanks for your reply

i would like to enter historical on / off records, with the protection of the working rule

would the process involve a loop of some sort, <on date and > off date for each record?
 
okay, I think that I understand a little better....

I would instead then try to use a combo box (or list box) that shows all the ON/OFF dates for a unit.

I would then use the AfterUpdate property for that control to modify the recordsource for a subform that shows all the appropriate records *between* those dates. The general idea is to build a SQL string with a WHERE clause that depends on the combo/list box for its parameters.

Let me know if have further questions.

-g
 

Users who are viewing this thread

Back
Top Bottom