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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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,214,853
Messages
6,121,935
Members
449,056
Latest member
denissimo

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