F
FBueller
For the life of me, I can't get this to work. I have 2 combo box
controls. I want the value selected in the first box9cboCarId) to be
passed as a parameter to the query underlying the second combo
box(cboPrevWeightEntry). Here's what I've got.
First Combo Box Properties:
Name - cboCarId
RowSourceTyoe - Table/View/StoredProc
RowSource - qry_list_active_car#_unreceived
BoundColumn - 1
Private Sub cboCarId_AfterUpdate()
Me.cboPreviousWeightEntry.Requery
Me.cboPreviousWeightEntry.Value =
Me.cboPreviousWeightEntry.ItemData(0)
Me.txt_MatType = Me.cboPreviousWeightEntry.Column(1)
Me.txt_WeightType = Me.cboPreviousWeightEntry.Column(2)
Me.txt_Scale_Weight = Me.cboPreviousWeightEntry.Column(3)
End Sub
Second Combo Box Properties:
Name - cboPreviousWeightEntry
RowSourceTyoe - Table/View/StoredProc
RowSource - qry_SearchForPreviousRecord
BoundColumn - 1
The query for the RowSource(qry_SearchForPreviousRecord) is as follows:
ALTER PROCEDURE webaccess.qry_SearchForPreviousRecord
AS SELECT dbo.RM_Notices.Car#, dbo.RM_Scale_Readings.Material,
dbo.RM_Scale_Readings.Gross_Tare_Wt, dbo.RM_Scale_Readings.Weight,
dbo.RM_Scale_Readings.Location, dbo.RM_Scale_Readings.Date_Time,
dbo.RM_Notices.[Complete?]
FROM dbo.RM_Notices INNER JOIN
dbo.RM_Scale_Readings ON dbo.RM_Notices.NoticeID =
dbo.RM_Scale_Readings.NoticeID
WHERE (dbo.RM_Notices.Car# =
N'Forms!frm_scale_house!Me.cbo_car_truck_num') AND
(dbo.RM_Notices.[Complete?] <> 1)
If I remove the parameter reference to the form cbo and make the
parameter @carID, I am prompted for the car ID and the text controls
populate as expected. But if I try to pass the form parameter to the
stored proc, I get nothing.
Can anyone help me? This is so frustrating!!
controls. I want the value selected in the first box9cboCarId) to be
passed as a parameter to the query underlying the second combo
box(cboPrevWeightEntry). Here's what I've got.
First Combo Box Properties:
Name - cboCarId
RowSourceTyoe - Table/View/StoredProc
RowSource - qry_list_active_car#_unreceived
BoundColumn - 1
Private Sub cboCarId_AfterUpdate()
Me.cboPreviousWeightEntry.Requery
Me.cboPreviousWeightEntry.Value =
Me.cboPreviousWeightEntry.ItemData(0)
Me.txt_MatType = Me.cboPreviousWeightEntry.Column(1)
Me.txt_WeightType = Me.cboPreviousWeightEntry.Column(2)
Me.txt_Scale_Weight = Me.cboPreviousWeightEntry.Column(3)
End Sub
Second Combo Box Properties:
Name - cboPreviousWeightEntry
RowSourceTyoe - Table/View/StoredProc
RowSource - qry_SearchForPreviousRecord
BoundColumn - 1
The query for the RowSource(qry_SearchForPreviousRecord) is as follows:
ALTER PROCEDURE webaccess.qry_SearchForPreviousRecord
AS SELECT dbo.RM_Notices.Car#, dbo.RM_Scale_Readings.Material,
dbo.RM_Scale_Readings.Gross_Tare_Wt, dbo.RM_Scale_Readings.Weight,
dbo.RM_Scale_Readings.Location, dbo.RM_Scale_Readings.Date_Time,
dbo.RM_Notices.[Complete?]
FROM dbo.RM_Notices INNER JOIN
dbo.RM_Scale_Readings ON dbo.RM_Notices.NoticeID =
dbo.RM_Scale_Readings.NoticeID
WHERE (dbo.RM_Notices.Car# =
N'Forms!frm_scale_house!Me.cbo_car_truck_num') AND
(dbo.RM_Notices.[Complete?] <> 1)
If I remove the parameter reference to the form cbo and make the
parameter @carID, I am prompted for the car ID and the text controls
populate as expected. But if I try to pass the form parameter to the
stored proc, I get nothing.
Can anyone help me? This is so frustrating!!