D
Dennis
I’m on Access 2003 on XP Office Pro on XP Pro w SP3.
I have trying to read a record using FindFirst and it is not working.
My table is called tblWarranty. Its primary key is ItemNo. It is an
automatically generated number. I have a query called qrytblWarranty that
joins the tblWarranty to tblCustomer (left join – all rcd in tblWarranty &
only those matching in tblCustomer). There is no selection criteria in the
query.
I have a form which access the warranty data using qrytblWarranty. There is
no filter on the form. The selects the customer from a drop down combo box.
The drop down combo box for Warranty parts limits the data that appears in
the drop down box to the customer’s parts. All of this works great.
When the user selects a part from the Repaired Parts list, I want to go
directly to that record. However, the FindFirst fails every time. Here is my
code.
lngItemNo = Nz(Me.cboItemNo, 0)
strFindFirst = "((ItemNo) = “ & lngItemNo & “)"
Set rs = Me.Recordset.Clone
If rs.NoMatch Then
DoCmd.GoToRecord , , acNewRec
Else
Me.Bookmark = rs.Bookmark
End If
I copied the above code from a program that works. I’ve read the other
FindFirst questions in this forum. I tried some of those suggestions, but
nothing worked.
How do I know that the record set I cloned really has the data I think it
has? Is there a way to view the data that is in the record set?
Thanks for any help.
I have trying to read a record using FindFirst and it is not working.
My table is called tblWarranty. Its primary key is ItemNo. It is an
automatically generated number. I have a query called qrytblWarranty that
joins the tblWarranty to tblCustomer (left join – all rcd in tblWarranty &
only those matching in tblCustomer). There is no selection criteria in the
query.
I have a form which access the warranty data using qrytblWarranty. There is
no filter on the form. The selects the customer from a drop down combo box.
The drop down combo box for Warranty parts limits the data that appears in
the drop down box to the customer’s parts. All of this works great.
When the user selects a part from the Repaired Parts list, I want to go
directly to that record. However, the FindFirst fails every time. Here is my
code.
lngItemNo = Nz(Me.cboItemNo, 0)
strFindFirst = "((ItemNo) = “ & lngItemNo & “)"
Set rs = Me.Recordset.Clone
If rs.NoMatch Then
DoCmd.GoToRecord , , acNewRec
Else
Me.Bookmark = rs.Bookmark
End If
I copied the above code from a program that works. I’ve read the other
FindFirst questions in this forum. I tried some of those suggestions, but
nothing worked.
How do I know that the record set I cloned really has the data I think it
has? Is there a way to view the data that is in the record set?
Thanks for any help.