Sort Table & Pull most recent record

G

Guest

I'm using a table to transfer data between forms,

This table periodically has new records put into it, & I was wondering how
to pull the most recent record

I'm not sure what the statement would be to pull the fields from that one
record into a variable
x = [field] of that first record.

Thanks so much for any help--
 
J

John W. Vinson

I'm using a table to transfer data between forms,

You're mistaken.

Forms *do not contain data*, any more than my office window "contains" the
Owyhee Mountain range.

Forms are just windows which *display* data, which is stored in a table, and
only in a table.
This table periodically has new records put into it, & I was wondering how
to pull the most recent record

Base the Form on a Query with a criterion

=DMax("[datefield]", "[tablename]")

on the date field, to select only the most recent record in the table.
I'm not sure what the statement would be to pull the fields from that one
record into a variable
x = [field] of that first record.

I have no idea what you're asking here.

John W. Vinson [MVP]
 

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