B
Brian
I have a very long form with sometimes hundreds of records. For each record,
there is a text box where the user can enter a quantity to be added/deleted
to the existing quantity. Once the quantity has been added/deleted, the form
requeries so that the quantity displayed is now accurate.
Since the form is so long, I want a way for the form to return to the record
that the user just updated. In Access 2003, I used this code:
dim rst as recordset
dim IntKeyVal as string
IntKeyVal = idx_IDNumber
Application.Echo False
<<<other VBA code here to add/delete from existing quantity>>>
set rst = me.recordsetclone
rst.findfirst IntKeyVal
me.bookmark = rst.bookmark
Application.Echo True
This worked well in Access 2003, but does not work in Access 2007. Access
2007 returns an error that says "Run Time Error '3001' Invalid Argument" and
when I debug, highlights the rst.findfirst IntKeyVal line. I should point
out that the IntKeyVal value is correct (when I hover over the line to see
the value).
Any help anyone can give would be most appreciated.
Brian
there is a text box where the user can enter a quantity to be added/deleted
to the existing quantity. Once the quantity has been added/deleted, the form
requeries so that the quantity displayed is now accurate.
Since the form is so long, I want a way for the form to return to the record
that the user just updated. In Access 2003, I used this code:
dim rst as recordset
dim IntKeyVal as string
IntKeyVal = idx_IDNumber
Application.Echo False
<<<other VBA code here to add/delete from existing quantity>>>
set rst = me.recordsetclone
rst.findfirst IntKeyVal
me.bookmark = rst.bookmark
Application.Echo True
This worked well in Access 2003, but does not work in Access 2007. Access
2007 returns an error that says "Run Time Error '3001' Invalid Argument" and
when I debug, highlights the rst.findfirst IntKeyVal line. I should point
out that the IntKeyVal value is correct (when I hover over the line to see
the value).
Any help anyone can give would be most appreciated.
Brian