G
Guest
I need help in having a form call data from a form it is not connected to.
Brief Background:
I have a number of tables in my project, and I have a formed that is
attached to a master table. On that form, I was able to get a combobox to
display data from one of the external tables (A list of vehicles, aptly named
'vehicles'). The box is showing the vehicle ID #s. And next to this box,
there is another box, that I would like to display the vehicle's respective
capacity (which is stored in the vehicles table, with each ID number).
So to attempt this, I set the After Update on the vehicle field on the form
to:
Private Sub Equipment_AfterUpdate()
DIM sSQL As String
sSQL = "SELECT vehicleID, capacity " _
& " FROM vehicles WHERE number = " & Me.Equipment
Me.Yards.RowSource = sSQL
Me.Yards.Requery
End Sub
THAT'S IT.
So no luck so far, nothing comes up in the second box. And i've tried with
and without the RowSource text, and as both a combobox and a text box.
Anyway, any help would be greatly appreciated.
Brief Background:
I have a number of tables in my project, and I have a formed that is
attached to a master table. On that form, I was able to get a combobox to
display data from one of the external tables (A list of vehicles, aptly named
'vehicles'). The box is showing the vehicle ID #s. And next to this box,
there is another box, that I would like to display the vehicle's respective
capacity (which is stored in the vehicles table, with each ID number).
So to attempt this, I set the After Update on the vehicle field on the form
to:
Private Sub Equipment_AfterUpdate()
DIM sSQL As String
sSQL = "SELECT vehicleID, capacity " _
& " FROM vehicles WHERE number = " & Me.Equipment
Me.Yards.RowSource = sSQL
Me.Yards.Requery
End Sub
THAT'S IT.
So no luck so far, nothing comes up in the second box. And i've tried with
and without the RowSource text, and as both a combobox and a text box.
Anyway, any help would be greatly appreciated.