How do I use submit button to add details to a table?

cwright

New member
Local time
Today, 14:59
Joined
Jan 10, 2006
Messages
5
Hi everyone, I am new to this so bear with me.

I currently have a form with textboxes and 2 combo boxes. I have a submit button at the bottom of the page and would like this to take all the infomation from the form and add to a master table.

I was hoping to be able to create a pop up message to say "This item has been added to the database"

Can anyone help point me in the right direction?

Many Thanks!
 
If you link a form to a table, the data is written without you having to "submit" it. If you want an unbound form, then you can create an Append Query, which will add the information for you. You can create a message box to alert the user this has been done, also an Append query should prompt you anyway.
 
Thanks reclusive will try append query and see what happens.
 
hmm from what I can tell this appears to be linkin a table to another. This database is basically for stock control and I wondered if my first post can be implemented in any way?

Again thanks to anyone who can point me in the right direction.
 
cwright said:
hmm from what I can tell this appears to be linkin a table to another.

This sentence doesn't make sense. I presume you are talking about the form?

cwright said:
This database is basically for stock control and I wondered if my first post can be implemented in any way?

I am still unclear as to what you mean. There is no need to "Submit" data in a form linked to a table. If you want to give a message once data has been written to a form/table, you can do so with events. Anything is possible, you need to express yourself more clearly.
 
Appologies reclusive. Not really meant to be on internet at work so had to be quick.

The database I have made is for stock control. I have a table called "products" which lists everything in our stock room.

I have a form called "stockinput" for when new stock arrives in our store.

I would like users to enter details of new stock into this form which has text fields & drop down boxes instead of adding to the table "products"

At the bottom of the form I made a button which, ideally when pressed, would take the information typed on the form and place it in a new row into the table "products"

I am unsure if this can be done or not?

Again many thanks!
 
Yes this can be done:
first use the wizard to make a form based on the table(add all objects)
on form in design view create drop down boxes that use a query to look for products already existing in the table.

After you have done this use the command wizard button to save form, rename save to update and you are done.

then on command button update open properties, on event chose after_click press the (...) button that appears after and choose code.

In visual basics enter a meesabox code to create message.

Ash
 
Last edited:

Users who are viewing this thread

Back
Top Bottom