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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

empty form but bound textfields

Status
Not open for further replies.

john307rnr

Programmer
Aug 10, 2002
10
DE
i want to open an empty form that contains "bounded" fields (i hope can imagine what i mean). but i always get all datasets of the specified table. i have tried the filter but i doesn't work. any other way to open an empty form. or is it possible to jump directly to the last (empty) dataset?

thanks
 
It sounds like you are saying you wish to open a form "empty", e.g. on a blank record. If this is so, you can do one of two things:

Alter your form-opening command to open the form in "add" mode:

DoCmd.OpenForm "YourFormName" , , , , acFormADD

(Note the FOUR commas between...

OR

Open the form in DESIGN mode, and open the FORM property sheet.

Look for the DATA tab. Click it.
Change the DataEntry value to YES.
Save the change.

This last option will ALWAYS open the form in "blank", data-entry mode, which may not be what you want. You'll have to determine which option is best for you.

Jim
Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
thanks a lot ... you kept me from spending much time on browsing the help file
 
how do i prevent access from autosaving a forms data? that means storing the entries in the (bound) textfields in the database ? i want to do this with a botton.
 
Updating bound fields is the default action when you reposition (move to another record) on a form, or close it.

To override this and control updating through code, you need to use UNBOUND controls, and assign their values in a procedure. It's the long way around, but some people like to do it.

You need to have assignments for each unbound control to it's appropriate matching bound field in the recordsource.

If all you want to do is put a "Save" button on the form, go ahead and do that - It frequently makes people feel better to do something specific to update their data. They don't have to know that the save would be done if they moved or closed the form anyway.

You can also query the DIRTY property of a form, and see if the screen buffer has changed from the original contents - this allows you to do a "You have changed the data? Do you want to save? yes/No" kind of operation that people sometimes like to see.

Jim

Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top