I need to know what code to type so that after I click the save button all the data in the form will be saved in the table.thank you
I need to know what code to type so that after I click the save button all the data in the form will be saved in the table.thank you
Is the form bound (has a RecordSource) and controls are bound (have ControlSource). If so, data enter into controls is entered directly to table. The inputs are committed to table record when the form closes, move to another record, or run code: DoCmd.RunCommand acCmdSaveRecord
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I am new to access i don't know if my form is bound. How do I know if it is bound or unbound? if it is bound/unbound what do i do? I need to have a save button because it's an assignment in one of my subjects.Thank You.
Yeah tia is right.
If RecordSource is not set, then how to set it?
Form in design view, open Properties sheet, select Data tab, look at form's RecordSource property. Anything in there?
Access Help has guidelines on creating bound form. Search topic: create form. This is basic Access functionality.
If your assignment is to use an unbound form, the code to save data will be more complicated.
Google: Access VBA save data unbound form
Here is one http://www.databaselessons.com/unbound-forms-1.php
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Here against Record Source there is nothing written. But there is a drop down list containing a list of tables, queries etc.
I have selected the respective tables to which I wish to send the data.
But what about the Control Source?
I think my table is bound. I need help on what to do in order to save the record using an unbound form. I hope you can help me with this. I am attaching a copy of my assignment. thank you so much for your help.
Thanks a lot June7! Your help was much needed! Finally done!
tia, I gave you a link to a tutorial for what you want to do.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hey one query...
In my form, wherever there is a combo-box containing Yes/No fields, the default in the form view shows #Error.
And once the form gets to fill up, #Error changes to:
-1 for Yes
and 0 for No
How to rectify this problem? The form doesn't look good if the default value is #Error or -1/0.
I don't know why showing #Error. The control is bound?
You can set the Format property of control to display Yes/No instead of -1/0.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yeah, thank you! Its working.
Can you pl tell me how to refresh the form, as in, whenever I open the form in form view, it contains the details of the last entry. I want the form to look fresh to fill up.
Can you suggest me as to what I should do?
Don't understand what you mean by 'contains the details of the last entry'. How does this make the form look 'fresh'?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I mean when the form is opened, the fields should be un-filled. Right now, when I open the form, I get the fields with values of the previous entry.
You can either set the form to always open to a new record, in which case it would never show existing records. Or can use code to open to new record. I use only VBA:
DoCmd.OpenForm "formname", , , , acFormAdd
Why does it show previous entry? Do you have records sorting DESCENDING?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.