Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning AutoNumber from a query.

Status
Not open for further replies.

Toga

Technical User
Jul 21, 2000
234
US
This is probably going to sound like a strange question but please bare with me. I have my form tied with a table on a database server and it is very slow to populate the recordsource with all of the records in the table when I open it.....ie it takes forever! What I have done is set it up so so the recordsource only accesses / pulls one record at a time... and seems to work great.

My only issue now is when I first open my form. I want the default mode to be on a new record for the user to fill in. If the user doesn't want to fill in a new recore, but wants to select a previous one from my drop down combo box, then that's fine too. (Having the ability to view previous records is why I can't open the form in the FormAdd mode)

Anyway, the only way I could get this to work was to put the following criteria expression into my recordsource query when my form first opens

DMax("MyRecordID","MyTable")+1

The form opens waiting for the user to enter a new record and it seems to work just fine....But I'm wondering if there's a right way to be doing this?

Any suggestions or comments greatly appreciated
Thanks...Toga
 
Put a button on a form and build event for it to remove filter. What yoy meed is to open form in append mode. If user don't want to append anything, he will press the button and go on. John Fill
1c.bmp


ivfmd@mail.md
 
Yes, I could do that but it's not what I want.

I am already opening the form in append mode but I want the default record location to be on a New Record entry. If the user wants to pull up a different record at that point, he can do so.

Thanks anyway...
Toga
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top