Form.CurrentRecord correct but Form.Recordset

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?
 
M

Marshall Barton

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.
 
G

Guest

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....
 
D

Dirk Goldgar

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top