cascade combo issue

DaniBoy

Registered User.
Local time
Today, 09:39
Joined
Nov 18, 2001
Messages
174
Hello,
I have been looking for some info on how to do this:

I have a form to input apartment complexes info, there I also have a subform where to put the units number, like 201,202,203 ect.

I also have a form called leaseinformation. there I can put the tenants info and I get to pick what complex he will live at and the unit number.

So, I have two combo boxes on this form, one is the complex and the other is the units. I want o be able to only see the units that belong to that complex. I have try to do somethings but i cant get it to work...

Please look at my db and help out!!

Daniel
 

Attachments

Try adding this code to your form:

Private Sub cbocomplexId_Change()
unitId.RowSource = "SELECT tblUnits.unitNum FROM tblUnits WHERE tblUnits.complexid=" & cbocomplexId.Value
End Sub
 
You had a couple of issues. See the attached database with the changes. Notice the readjustment of your Lease Info form (visually), also the properties of both combo boxes in question including the AfterUpdate property of the Complex combo. Think this should solve your problems. Good luck. JT
 

Attachments

thanks

I now understand!! YEEEHHHAAAA!!:) ;) :eek:
 

Users who are viewing this thread

Back
Top Bottom