Command Button

StephenSLR

Registered User.
Local time
Today, 17:00
Joined
Oct 25, 2005
Messages
48
I have inserted a Command Button in a Form to open another form.

It opens the nominated form but the previous form is still on screen in front of the nominated form.

I have named the Command Button "Next >" just like you see on many forms and I want it to save the information, close the current form and go to the nominated form when clicked.

How is this done?

s
 
In the properties of the button modify the on click event to

DoCmd.Close acForm, "Youf first form name"
DoCmd.OpenForm "Your second form name", acNormal
 
aleb said:
In the properties of the button modify the on click event to

DoCmd.Close acForm, "Youf first form name"
DoCmd.OpenForm "Your second form name", acNormal

I have gone to the properties and when I click the event tab, there is a line for on click but it has a drop down list with DocMacro functions.

How do I do what you have described?

s
 
:)
Select this function and click on the 3 dots to the right, copy the code to the thread to see what the function is doing
 
aleb said:
:)
Select this function and click on the 3 dots to the right, copy the code to the thread to see what the function is doing

Всего наилучшего mate,

it worked perfectly.

s
 
Does clicking the "Next >" button save the records on the form?

If not how is this done so "Next >" becomes a "Save and Next >" command button.

s
 
Last edited:
By closing the form you are saving the record
If everything is filled on the form correctly ( according to the rules ) access will save record and close the form silently. if not ... it will swear and let you know why it doesn't like your entries. :)
 
aleb said:
By closing the form you are saving the record
If everything is filled on the form correctly

Thanks, I mean to say that I have quite a few tables on the form and most will not require an entry.

When I click "Next >" I would like the non-used tables to record a zero value without having the person enter a zero value manually.

s
 
I am puzzled here .
You want access to record blank entry ? Why ?
 
aleb said:
I am puzzled here .
You want access to record blank entry ? Why ?

I am setting up a database I guess like a spreadsheet.

i.e.

Form one = Project A

it includes tables:

a) Project planning |Hours| | Rate|

b) Scope |Hours| | Rate|

Form Two Project B

including same tables

a) Project planning |Hours| | Rate|

b) Scope |Hours| | Rate|

Let's say that there was no time spent for Scope in Project B but time was spent on Scope in the following Project C

I wouldn't want the values for Project C ending up with those of Project B.

s
 
aleb said:
I am puzzled here .
You want access to record blank entry ? Why ?

I find that if I don't fill at least one field in every table, when I click the "Next >" button then click the "< Back" button the data is not saved.

If at least one field in every table is filled the data for the whole form is saved when I click Next then "< Back".

s
 
Last edited:
to make it easier can you post your db ?
 

Users who are viewing this thread

Back
Top Bottom