Join Queries as a record ssource of the form

Progress2007

New member
Local time
Yesterday, 16:37
Joined
Jul 17, 2009
Messages
2
Hello
I have created a form which has multiple tabs. Each tab containing control source from diffrent tables.

I want to assign form's Record source as a query so that when some one hits on save button the all data should be saved to respective tables.

Pleae tell me how can i write code for this. I am using these lines of code.
<code>
globalAddModeFlag = True
DoCmd.OpenForm "newform"
Forms!newform.RecordSource = l_strQuery
Forms!newform.Requery
Forms!newform.DataEntry = True
Forms!newform.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
Forms!newform.AllowAdditions = False
Forms!newform.butCancelSib.Visible = True

Forms!newPatientInfo.ChildFamilyProgram.Enabled = False


</code>


Please tell me how can i do this....
 
hey 2007. welcome to awf.

you should be aware that when you leave a record the record is saved. if you leave one tab to go to another tab, an unsaved record in the first tab will be saved. you have to hide or lock everything on the form to prevent users from leaving each form/tab to control the save routines. otherwise you my have to use unbound forms.
 

Users who are viewing this thread

Back
Top Bottom