M
Mick
Hi All
Have two forms, stock and order. When the user selects from a Lookup
wizard StockID (based on a field in Stock table) I need it to open
Stock table at right record so ammendments can be made.
Code is:
Private Sub StockID_Exit(Cancel As Integer)
'this stock ID is on the order form
Dim findstocknumber As Long
StockID = findstocknumber
DoCmd.OpenForm "frmStock"
StockID.SetFocus
DoCmd.FindRecord findstocknumber
Forms![frmOrder].SetFocus
End Sub
When I use an entry from Stock ID such as "crisps" as the argument for
DoCmd.FindRecord it works fine, but can't use the variable
findstocknumber instead.
Can't believe I'm stuck on such a simple thing, but there you go.
Any help appreciated
Mick
Have two forms, stock and order. When the user selects from a Lookup
wizard StockID (based on a field in Stock table) I need it to open
Stock table at right record so ammendments can be made.
Code is:
Private Sub StockID_Exit(Cancel As Integer)
'this stock ID is on the order form
Dim findstocknumber As Long
StockID = findstocknumber
DoCmd.OpenForm "frmStock"
StockID.SetFocus
DoCmd.FindRecord findstocknumber
Forms![frmOrder].SetFocus
End Sub
When I use an entry from Stock ID such as "crisps" as the argument for
DoCmd.FindRecord it works fine, but can't use the variable
findstocknumber instead.
Can't believe I'm stuck on such a simple thing, but there you go.
Any help appreciated
Mick