S
slowuptake
I have a form that contains a set of 3 combo boxes allowing user to choose
employee, month and year (of monthly timesheets eventually). Then I have a
button with some some event code ( a DLookup courtesy of 2 MVP's) that will
take the values in the combo boxes and return the timesheet ID (primary key
number) of the unique record in a table that contains those 3 values. But I
haven't yet done anything with the ID value except look it up and store it as
a local variable in the button's event code.
I thought next to add a subform that would sort the detailed time entries by
the time sheet ID returned by the button event code. This subform is already
working - standalone.
My immediate problem is that the user entered values in the three combo
boxes are changing the values of the CURRENT (usually the first) record in
the table before the button code has a chance to look anything up, and thus
before any "GoToRecord" or similar could be activated.
I see the reason this is happening is that the variables (for employee,
month, year) are the same in the related tables. Do I (can I) break the
relationships with employee, month and year tables? Or is there a better
way?
regards,
slowuptake
employee, month and year (of monthly timesheets eventually). Then I have a
button with some some event code ( a DLookup courtesy of 2 MVP's) that will
take the values in the combo boxes and return the timesheet ID (primary key
number) of the unique record in a table that contains those 3 values. But I
haven't yet done anything with the ID value except look it up and store it as
a local variable in the button's event code.
I thought next to add a subform that would sort the detailed time entries by
the time sheet ID returned by the button event code. This subform is already
working - standalone.
My immediate problem is that the user entered values in the three combo
boxes are changing the values of the CURRENT (usually the first) record in
the table before the button code has a chance to look anything up, and thus
before any "GoToRecord" or similar could be activated.
I see the reason this is happening is that the variables (for employee,
month, year) are the same in the related tables. Do I (can I) break the
relationships with employee, month and year tables? Or is there a better
way?
regards,
slowuptake