Blank forms

C

cyb3rwolf

Hello.
Having trouble with this one... new to access...
I have three different forms. Each time i load each one up, all the data
from the last record is poplulated into the fields. How do i make it for
sure either load up blank each time, or with only information that i specify?
there doesn't appear to be an on start event or anything like that... anybody
help me out?
 
D

Daniel Pineault

One option to open the form in data entry mode (blank form) is to set the
Data Entry Property to True.

Open the form in design mode
Goto the Data Tab
Set the Data Entry property to True
Close and Save the change
 
T

Tom Wickerath

I have three different forms. Each time i load each one up, all the data
from the last record is poplulated into the fields.

It sounds like the Record Source property for your form might be a query,
with an autonumber or date added field sorted in descending order. Open the
form in design view. If the Properties dialog is not already displayed, click
on View | Properties to toggle it on (you can also press the F4 button in
Access 2002 and later). Make sure that the word "Form" is displayed in the
blue title bar of the Properties window. If you have some other section or
control selected, click on the small black square in the upper left corner,
where the rulers meet, as one method of selecting the form.

Select the Data tab of the Properties dialog. The first entry should read
Record Source. If the record source is the name of a table, then you should
create a query instead. If you click into this property, you should see a
button to the right with three dots (the Build button). Click on the Build
button to open the query builder. If prompted to create a query, select Yes.
Set the sort order that you desire, by picking Ascending or Descending for
the appropriate field(s). Sorting is done from left to right, with the left
most field in the QBE (Query By Example) grid being the first sort.
How do i make it for sure either load up blank each time, or with only
information that i specify?

To open a form to a new blank record, you can set the Data Entry property to
Yes. This is a Form property found on the Data tab of the Properties dialog.
If you are using a macro to open your form, you can set the Data Mode
property in the lower window to Add. Finally, if you are using VBA code to
open the form, you can use the optional DataMode parameter. For example:

DoCmd.OpenForm "NameOfForm", DataMode:=acFormAdd


Since you are new to Access, I recommend taking a look at Access MVP
Crystal's new tutorials, available here:

http://www.accessmvp.com/Strive4Peace/Index.htm


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Top