J
Jason V
I am trying to look up a "CWA Number" from tblLabourTransaction using a
unique Reference Number as criteria. "txtAssRefNumber" is an unbound object
where the user enters the reference number to be searched.
In other words, the user enters the reference number, triggers the event,
and Access returns the CWA Number associated with it from
tblLabourTransaction.
I am getting the following error: No value given for one or more required
parameters.
This is what I have. Any help would be appreciated.
Dim s As String
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set db = CurrentProject.Connection
s = "SELECT * FROM tblLabourTransaction WHERE
tblLabourTransaction.Reference_Number = txtAssRefNumber;"
Set rs = New ADODB.Recordset
rs.Open s, db, adOpenStatic, adLockOptimistic
Me.txtCWANumber = rs.Fields("CWA Number")
Set rs = Nothing
Set db = Nothing
Thanks,JV
unique Reference Number as criteria. "txtAssRefNumber" is an unbound object
where the user enters the reference number to be searched.
In other words, the user enters the reference number, triggers the event,
and Access returns the CWA Number associated with it from
tblLabourTransaction.
I am getting the following error: No value given for one or more required
parameters.
This is what I have. Any help would be appreciated.
Dim s As String
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set db = CurrentProject.Connection
s = "SELECT * FROM tblLabourTransaction WHERE
tblLabourTransaction.Reference_Number = txtAssRefNumber;"
Set rs = New ADODB.Recordset
rs.Open s, db, adOpenStatic, adLockOptimistic
Me.txtCWANumber = rs.Fields("CWA Number")
Set rs = Nothing
Set db = Nothing
Thanks,JV