opening forms

G

Guest

Ok.....I finally figured out how to open a form on the same record with
multiple controls. Now my problem is that I need to save the record before
opening the other forms. Here's what I have:

Form1: has a subform with three controls (there are of course more, but
those three are the important ones.) this form has a command button that
opens another form based on those three controls.

Form2: opens fine but doesn't fill in the three control's because they
aren't saved in the table yet.

Form3: Same as form2
 
G

Guest

If the records are in the sub form and the button is on the main form, when
you exit the sub form to press the button the records are automatically
saved, unless you need to save the records on the main form.
In that case write

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

to save the records, before you open form2 or form3.
 
G

Guest

the button is on the subform. and the main form automatically enters info
into the table, but the subform doesn't do that untill i close it.
 
G

Guest

Before you open form2 try 3 things
1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Docmd.Openform "Form2"
====================================
2
Set the focus to a field in the Mainform before you open Form2, loosing the
focus from the sub form should save the record.

Forms![MainFormName]![FieldName].setFocus
Docmd.OpenForm "Form2"
====================================
3
Put the button to open form2 on the main form
====================================
 
G

Guest

OK...the first suggestion worked....but when i went to the table to check it,
i tried to delete the record and it gave me error 3709. What is that?

Ofer said:
Before you open form2 try 3 things
1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Docmd.Openform "Form2"
====================================
2
Set the focus to a field in the Mainform before you open Form2, loosing the
focus from the sub form should save the record.

Forms![MainFormName]![FieldName].setFocus
Docmd.OpenForm "Form2"
====================================
3
Put the button to open form2 on the main form
====================================


Brandie said:
the button is on the subform. and the main form automatically enters info
into the table, but the subform doesn't do that untill i close it.
 
G

Guest

An answer given on the subject by Lynn Trapp:

Click on this link copy and paste it into a browser. it will take you the
the results of a search on the error you received. You should get about 8
hits. Check those articles to see if there is anything that might give you a
clue to yourproblem.

http://support.microsoft.com/search...L&maxResults=25&Titles=false&numDays=&InCC=on

--


Brandie said:
OK...the first suggestion worked....but when i went to the table to check it,
i tried to delete the record and it gave me error 3709. What is that?

Ofer said:
Before you open form2 try 3 things
1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Docmd.Openform "Form2"
====================================
2
Set the focus to a field in the Mainform before you open Form2, loosing the
focus from the sub form should save the record.

Forms![MainFormName]![FieldName].setFocus
Docmd.OpenForm "Form2"
====================================
3
Put the button to open form2 on the main form
====================================


Brandie said:
the button is on the subform. and the main form automatically enters info
into the table, but the subform doesn't do that untill i close it.

:

If the records are in the sub form and the button is on the main form, when
you exit the sub form to press the button the records are automatically
saved, unless you need to save the records on the main form.
In that case write

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

to save the records, before you open form2 or form3.


:

Ok.....I finally figured out how to open a form on the same record with
multiple controls. Now my problem is that I need to save the record before
opening the other forms. Here's what I have:

Form1: has a subform with three controls (there are of course more, but
those three are the important ones.) this form has a command button that
opens another form based on those three controls.

Form2: opens fine but doesn't fill in the three control's because they
aren't saved in the table yet.

Form3: Same as form2
 
G

Guest

OK i take that back. nothing seems to be working and htat error won't go
away and i have a wierd record.

Ofer said:
Before you open form2 try 3 things
1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Docmd.Openform "Form2"
====================================
2
Set the focus to a field in the Mainform before you open Form2, loosing the
focus from the sub form should save the record.

Forms![MainFormName]![FieldName].setFocus
Docmd.OpenForm "Form2"
====================================
3
Put the button to open form2 on the main form
====================================


Brandie said:
the button is on the subform. and the main form automatically enters info
into the table, but the subform doesn't do that untill i close it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top