addiing a record to a table from a form

seriouslystuck

Board Regular
Joined
Sep 24, 2009
Messages
97
Hi All

I need some help! This is my first attempt at a DataBase. I have created a Form in access 2003 that I want the user to complete then on clicking a command button it adds the data as a new line in the table. I have tried the wizard and created the add record button which opens the VB window but Im not sure what code to add..

Any advise would be great.

Thanks
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Just to add to this each text box on the form is controlled by a different table as they are all drop down boxes. I have a main table where I want the new record added when the command button is clicked.
 
Upvote 0
If your form is bound to your "main table," then you do not need a command button to update your table. Closing the form or advancing to a new or old record will automatically update your table.

If however, your form is not bound to your table, then you will need to take a different approach. Here is a video tutorial if that is the situation.

http://www.datapigtechnologies.com/flashfiles/addformrecordsnocode.html

Alan
 
Upvote 0
Alan, that tutorial was extremely helpful. I was wondering if you could point me in two directions:
1.) I am having trouble with my listbox repainting when the new record is added. I am not quite sure of the syntax.

2.) I would like to be able to delete by double clicking on an item from the listbox. I am sure it involves some of the same things as this, but if there is a demo and you know, I would like to know.

Thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,882
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top