dynamic form data (1 Viewer)

jesus_hairdo

Registered User.
Local time
Today, 01:06
Joined
Sep 28, 2001
Messages
32
i have a form which contains 2 fields (both drop down boxes).
What i want to do is for the 2nd field data to change depending on what is select in field 1.

For example if field 1 was selected as even numbers , field 2 would just show even numbers, and if field 1 was odd numbers field 2 would show odd numbers.
(basically field 2's data is from one field, the selection criteria would just differ and be dependant on what is selected in field 1.

How would i go about doing this sort of thing ??

cheers

Jamie
 

PearlGI

Registered User.
Local time
Today, 01:06
Joined
Aug 30, 2001
Messages
125
Get the AfterUpdate event of field1 to set the RowSource property of field2 based on the value contained in field1.

The VBA to change the RowSource of field2 would look something like:

Me.field2.RowSource = "SELECT [field2Data] FROM [field2Table] WHERE [something] = " & me!field1

This should give you enough to work with.
 

jesus_hairdo

Registered User.
Local time
Today, 01:06
Joined
Sep 28, 2001
Messages
32
OK cheers, i'll give it a go & let you know how i get on, (i've only really done any vba once before so quite new to it, done other scripting tho !)
 

Users who are viewing this thread

Top Bottom