Goto Record problem

B

Bryan

Hey all,
I have a DB (ACC2003) that I am working on for an apartment complex. So far
it's been fairly simple, but I've got a weird bug I can't comprehend. I am
using an unbound Cbo to select from that lists all the apt numbers derived
from my table. Once they select that, I set a "GO" command button next to it
tied to a macro using the goto record action. I am using goto and then
=[aptnumber] (my cbo name) for my offset. It jumps to the record I
selected.... minus one. I.e., if I select 201D then the record displayed is
201C. Any ideas or solutions?
Thanks!
 
D

Dirk Goldgar

Bryan said:
Hey all,
I have a DB (ACC2003) that I am working on for an apartment complex.
So far it's been fairly simple, but I've got a weird bug I can't
comprehend. I am using an unbound Cbo to select from that lists all
the apt numbers derived from my table. Once they select that, I set
a "GO" command button next to it tied to a macro using the goto
record action. I am using goto and then =[aptnumber] (my cbo name)
for my offset. It jumps to the record I selected.... minus one.
I.e., if I select 201D then the record displayed is 201C. Any ideas
or solutions?
Thanks!

I'm curious -- what's are the rowsource and bound column properties of
your combo box? I wouldn't expect GoToRecord to come even close to
working in a case like this, unless your [aptnumber] combo box is
actually bound to a numeric field in something like a consecutive
ascending sequence. GoToRecord can go to the first, last, next,
previous, or new record, or it can go to a specific "record number" as
the records are currently displayed and sequenced in the form, but that
"record number" is not in any way inherent in the content of the records
or their fields.

What I would expect you to be doing is a *find* in the form's recordset
for the record that has the apartment number you chose. This is one of
the choices that the combo box wizard offers if you let it build the
combo for you: "find a record on my form".
 
Top