By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,479 Members | 2,239 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,479 IT Pros & Developers. It's quick & easy.

should save button be on main form or subform?

P: 65
Hello,

I am creating a form for data entry. The main form has personal (address, phone) information that is allready stored. the subform has blank fields for information that is being entered. The fields on the subform are stored in a different table than the personal information on the main form. Each form is bound to the corresponding table.

I use the code created by the wizard for the save button. something like:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command49_Click()
  2. On Error GoTo Err_Command49_Click
  3.  
  4.  
  5.     DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
  6.  
  7. Exit_Command49_Click:
  8.     Exit Sub
  9.  
  10. Err_Command49_Click:
  11.     MsgBox Err.Description
  12.     Resume Exit_Command49_Click
  13.  
  14. End Sub
  15.  
my question is, should the save button be on the subform, the main form, or both? The fields on the main form may be altered if user notices an error in personal information.

Thanks in advance for your time.
Jan 17 '07 #1
Share this Question
Share on Google+
4 Replies


ADezii
Expert 5K+
P: 8,597
Hello,

I am creating a form for data entry. The main form has personal (address, phone) information that is allready stored. the subform has blank fields for information that is being entered. The fields on the subform are stored in a different table than the personal information on the main form. Each form is bound to the corresponding table.

I use the code created by the wizard for the save button. something like:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command49_Click()
  2. On Error GoTo Err_Command49_Click
  3.  
  4.  
  5.     DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
  6.  
  7. Exit_Command49_Click:
  8.     Exit Sub
  9.  
  10. Err_Command49_Click:
  11.     MsgBox Err.Description
  12.     Resume Exit_Command49_Click
  13.  
  14. End Sub
  15.  
my question is, should the save button be on the subform, the main form, or both? The fields on the main form may be altered if user notices an error in personal information.

Thanks in advance for your time.
The Save Button can go on the Main Form.
Jan 17 '07 #2

P: 65
OK I am still not doing something right. My main form has two subforms one to check address information the other for information to be entered.

There is a combo box on the main form to select what person to check / add information for. The combobox's control source is the personID field.

When I save I get TWO new records
(1) just the personID and
(2) just the information entered and no personID.

I think it is saving the main form's only bound field (the combo box -> personID) and then saving the subforms as a different record.

Thanks for your help
Jan 18 '07 #3

P: 65
OK I am still not doing something right. My main form has two subforms one to check address information the other for information to be entered.

There is a combo box on the main form to select what person to check / add information for. The combobox's control source is the personID field.

When I save I get TWO new records
(1) just the personID and
(2) just the information entered and no personID.

I think it is saving the main form's only bound field (the combo box -> personID) and then saving the subforms as a different record.

Thanks for your help
never mind I fixed it. think I need more sleep. sorry for the bother.
Jan 18 '07 #4

NeoPa
Expert Mod 15k+
P: 31,186
never mind I fixed it. think I need more sleep. sorry for the bother.
Lol - let us know if you have more problems.
Jan 18 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.