Empty controls

  • Thread starter Thread starter Bernd
  • Start date Start date
B

Bernd

Hi,
I would like that when I enter in my form, all the
controls were to be empty. So that no record of the
associated table is selected by default. Now, when I
activate my form, by default it enters in the controls
the values of the first record in the table.
How can I obtain this?
Thanks
Bernd
 
Bernd,

If you intend to use the form for entering new records only, and don't want
the user to be able to display/change existing records, then change the
form's Data Entry property to Yes.
If, on the other hand, you do want the user to be able to display / change
existing records, but just open the form to a new record by default, then
use the form's On Open event to run a macro with a GoToRecord action,
argument New.

HTH,
Nikos
 
Hi Nikos,
my case is the second you wrote so I've to run a macro
with a GoToRecord action, but I would like to as you if
you could write me the exactly code that I've to insert
in the On Open property.
Could you please do this?
Thanks
Bernd
 
Bernd,

While in form design view:
Select the form object from the menu: Edit > Select Form
Display the properties window: View > Properties
Select tab Events, and put the cursor next to the On Open property.Click on
the little button with the three dots on the right, and select Macro
Builder. You will be taken to a macro design screen. In the first line type
GoToRecord under Action and tab out of the cell. Now go the arguments
section at the bottom left hand corner, and change the default Next to New
next to the Record argument. Save giving a meaningful name, and you are
done.

HTH,
Nikos
 
Back
Top