Please help - Add new record from form to database

G

Guest

Dear Sirs / Mdms,

Sorry for my ignorance. I'm very new to MS Access 2003. I would appreciate
your help and advices. Look forward to hear from you soon. Thanks.

I've created a data entry form (named 'Job request form') with a 'Submit'
button. The Data Entry property of this form is set to 'Yes'. This form is
supposed to submit to a table (named 'tblJobRequests'). This form also
contains ten combo boxes that display data from six other tables, namely:

(1) tblDay
(2) tblDepartments
(3) tblMonth
(4) tblCoordinators
(5) tblWeekday
(6) tblYear

I've created a Macro (tblJobRequests_AddNew) for the 'Submit' button on the
form, which contains:
(a) Action - OpenForm
Form Name - Job request form
View - Form
Data Mode - Add
Window Mode - Normal
(b) Action - Save
Object Type - Form
Object Name - Job request form

Unfornately when I complete the form and click the 'Submit' button, nothing
works. No data is collected and displayed in the 'tblJobRequests' table.

Please let me know what I should do. Thanks alot.

Best regards, Araxes
 
U

Uncle Gizmo

I suspect your form is unbound, not bound to the data in the relevant
table.

if you Highlight the table that you want a data entry form based on,
then select "insert " from the menu options and then the option
"autoform" this will generate a form for you based on the table
selected. The form will show you the existing records in the table, and
there is a button along the bottom to allow you to add new records.
 
G

Guest

Araxes, it looks like you've got the macro cancelling itself out. It is
opening the form, that you've already opened, in Data Add mode (data entry)
then saving it. That is, you open the form, fill in the new data, click
Submit and the macro opens the (already) opened form to a new record and
saves.......no data.
A easier method would be to have the Submit button simply Save the record
(command button wizard) and another button Add a Record (new data).
 

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