Unanswered: newbie Q's about pulling info from 2 tables
I have a form with two options in a combo box, what i want to do is inthe next combo box in line if the first box =1 then load from list 1, but if the answer is 2 then load from list two. But in the same combo i was thinking something like
If[class]=1 then SELECT Visit_type_med.visit_type_med FROM Visit_type_med;
Where class is the name of the first combo
I'm sure this is way off base but i'm new and swinging in the dark.
Thanks in advance
Tryied this today and am not sure how to put this together
Please look at the zip and shed some light, (agin i just started vb about 3 weeks ago and am trying to catch up)
The box named vc is where the dewsisin 1,2 is made
box vis_type is the target
and i'm pulling from visit_type_med and visit_type_psyc
if you can get me started i'm sure i can figure this out
thanks in advance
OK... I added a little code to select the record source for the second combo box based on the first combo boxes value. Your tables had ID fields that were not populated, you should use Autonumber if the ID is not going to be visible. Also, you should really have a seperate column for the the numbers and not include them with the string. In your second combo box I had to change the column count to 2 so the string would show up (column 1 I made 0 width).
Another note, you have many tables with the same data...
vist_type_med and visit_type_psyc could be one table with additional column named 'Type'. Then your record source's could be something along the lines of:
SELECT "Reason" FROM "Visit_Type" WHERE "[Type] = ""Med""
SELECT "Reason" FROM "Visit_Type" WHERE "[Type] = ""Psyc""