Need help with code.

jukus

Registered User.
Local time
Yesterday, 22:37
Joined
Jan 9, 2008
Messages
52
Here is what I would like to do.

I have two tables. tblGarageUnits and tblGarageUnitInfo

PK for GarageUnit is A1, A2,... and this is the only field in the table (GarageID). GarageUnitInfo has PK which is autonumber, and FK which is same as GarageUnit, and has other fields in the table.

What I would like to do is from my switchboard go to a form that has a combobox only that contians the info from GarageUnit (The unit number only)
and in the after update event open a form that contains info from GarageUnitInfo based on the the unit number selected from the combo box.

Any ideas on the code to do this would be greatly appreciated.

Thanks.
 
Thanks. I will give it a try. Appreciate the info
 
Let me know if it works for you. I'm trying to improve the site, so any thoughts would be appreciated.
 
Drop the fou-fou background, Paul, it's distracting (to this old code hack, at any rate) and the light green remmed out text in Multi-select Listbox to Filter a Report is impossible to read!

(Well, you asked!)

The site, on the other hand, is a great idea!

Congrats!

Linq
 
I appreciate the thoughts Linq, and I don't mind constructive criticism. I'll take a look in the morning.

I'll be the first to admit that my "artistic eye" is pretty bad. My skills are making things work, not making them look good! :p
 
The code does not seem to be working properly. It always opens to the first item of the form and does not open to the one selected.

Here is my code.
DoCmd.OpenForm "frmGarageUnitInfo", , , "GarageID = '" & Me.GarageID & "'"

It always opens the form to A1 instead of A2, A3, etc. if that one is selected.
 
Never Mind, I figured out my error. I typed in the field name instead of the ComboBox name.

Thanks again for the help. The code works fine, but the person typing it does not :)
 

Users who are viewing this thread

Back
Top Bottom