Form.CurrentRecord correct but Form.Recordset

  • Thread starter Thread starter RP
  • Start date Start date
R

RP

In trying to access the data in the current recordset on
a form I am having the following problem:

Form.CurrentRecord has the correct record number - 2,
however, Form.Recordset(x) (any field) in the next line
of code is still holding the data from the last record

any clues?
 
RP said:
In trying to access the data in the current recordset on
a form I am having the following problem:

Form.CurrentRecord has the correct record number - 2,
however, Form.Recordset(x) (any field) in the next line
of code is still holding the data from the last record

any clues?


No idea at all.

Why are you even trying to use the form's recordset? In the
from's Current event, the bound controls on the form should
contain the values from the current record.
 
I have fields on the form that are not bound - I do some
coding to manipulate the values being displayed. I have
looked into using the DoCmd.FindRecord, but it seems like
it should be much easier than that. If the value of
Form.CurrentRecord=2, then why does Form.Recordset still
contain the data for record #1. I have to be missing
something simple....
 
I have fields on the form that are not bound - I do some
coding to manipulate the values being displayed.

The fields in the form's recordset are also available as properties of
the form, so long as they don't conflict with pre-existing property
names. Have you tried referring to them that way; e.g., Me.FieldName?
I have
looked into using the DoCmd.FindRecord, but it seems like
it should be much easier than that. If the value of
Form.CurrentRecord=2, then why does Form.Recordset still
contain the data for record #1. I have to be missing
something simple....

I seem to recall seeing something like this problem when mixing
navigation via the form's Recordset property and regular navigation,
but I can't recall exactly what. It's not just the case that you're on
a new record, by any chance?
 
Back
Top