Linking records?

L

Lime

Hello,
I have two tables one named "Program Type" and the other names "Weeks" to a
combo box on a form.
I would like to have the form which consist of the Data table to show the
available records based on the selection of the combo boxes mentioned. I have
the Program type working but can not figure out how to get the weeks to work
in conjuction with program type.

So if the Program type "ECF" is chosen from the combo box the data table
will show all records that have "ECF" in the program type field. and then if
1/07/07 is chosen from the "weeks combo box it show all records in the data
table that have a program type of "ECF" and have a week of date of 1/07/07.

Please HELP...

Thanks,
Lime
 
D

Damian S

Hi Lime,

Set a filter on your form, remembering to allow for null values. The below
sample shows how to set the filter assuming there are values in both combos:

me.filter = "[Program Type] = '" & me.cboProgramType & "' and [Week Date] =
#" & me.cboWeekDate & "#"
me.filteron = true

Hope this helps.

Damian.
 
L

Lime

Hello Damian,
This may be a real dumb question. but where do I put that code?

Lime

Damian S said:
Hi Lime,

Set a filter on your form, remembering to allow for null values. The below
sample shows how to set the filter assuming there are values in both combos:

me.filter = "[Program Type] = '" & me.cboProgramType & "' and [Week Date] =
#" & me.cboWeekDate & "#"
me.filteron = true

Hope this helps.

Damian.

Lime said:
Hello,
I have two tables one named "Program Type" and the other names "Weeks" to a
combo box on a form.
I would like to have the form which consist of the Data table to show the
available records based on the selection of the combo boxes mentioned. I have
the Program type working but can not figure out how to get the weeks to work
in conjuction with program type.

So if the Program type "ECF" is chosen from the combo box the data table
will show all records that have "ECF" in the program type field. and then if
1/07/07 is chosen from the "weeks combo box it show all records in the data
table that have a program type of "ECF" and have a week of date of 1/07/07.

Please HELP...

Thanks,
Lime
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top