Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bookmark problem

Status
Not open for further replies.

Watermelon

Programmer
Apr 16, 2001
68
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top