Watermelon
Programmer
Hi,
I have a shopping cart form that uses a form/subform. A user can enter a new order in the subform. To do this, they need to enter a part number. After the part number is entered the subform is refreshed and the total amount of the order is recalculated. This probably sounds strange, but about one out of every 20 times I enter a part number and the form requeries to recalculate the price, I get a "Not a valid bookmark message." I'm using the bookmark so when the form refreshes the cursor will return to the last record the user entered (or changed).
Any ideas on why I'm having this problem? My bookmark code is below:
If (Me.NewRecord) Then
Dim strBkmk As String
strBkmk = Me.Bookmark
Me.Requery
Me.Bookmark = strBkmk
DoCmd.GoToRecord , , acNext, 1
DoCmd.GoToControl "Quantity"
Else
Dim strBkmk1 As String
strBkmk1 = Me.Bookmark
Me.Requery
Me.Bookmark = strBkmk1
DoCmd.GoToControl "Quantity"
Thanks,
watermelon
I have a shopping cart form that uses a form/subform. A user can enter a new order in the subform. To do this, they need to enter a part number. After the part number is entered the subform is refreshed and the total amount of the order is recalculated. This probably sounds strange, but about one out of every 20 times I enter a part number and the form requeries to recalculate the price, I get a "Not a valid bookmark message." I'm using the bookmark so when the form refreshes the cursor will return to the last record the user entered (or changed).
Any ideas on why I'm having this problem? My bookmark code is below:
If (Me.NewRecord) Then
Dim strBkmk As String
strBkmk = Me.Bookmark
Me.Requery
Me.Bookmark = strBkmk
DoCmd.GoToRecord , , acNext, 1
DoCmd.GoToControl "Quantity"
Else
Dim strBkmk1 As String
strBkmk1 = Me.Bookmark
Me.Requery
Me.Bookmark = strBkmk1
DoCmd.GoToControl "Quantity"
Thanks,
watermelon