Data from forms to table - back to basics

bodhran1

Dazed and Confused
Local time
Today, 09:59
Joined
Mar 27, 2002
Messages
43
Hi all,

I have a table (lets call this "TBL_USERDATA")

I also have data ("NAME") in a form (FORM_INFO) that the user has entered .

When the user clicks on the "UPDATE TABLE" button on the form , I want this data to be appended to my table.

Can anyone give me a clue as to how to write this. The help files are useless unless you know what to look for.

I'm learning VB and Access as I go, so please go easy one me.



Thanks!!!

Dave
 
Perhaps I am oversimplifying, and I don't know your level of expertise, but if your form has that table as it's RecordSource, new records will automatically be appended to the source table. If this table is not the source for the form, check out Recordset and AddNew in Access Help.
 
Thanks for the help Pdx_man. I'll check into Recordset etc.

My expertise (if I have any) is actually designing printed circuit boards.

What am I doing here then you ask? Well...Our software uses Visual Basic to extract info from the board design. I taught myself VB to see what I can make it do. I had a blast with it and the company benifited from the programs.

Working for a really small company, my manager asked me if I'd also like to learn Access in my spare time (read- on my own time) and write a program to assist uses thru the steps to create an ECR (Engineering Change request).

So far the program will take the users name, check thier level of security and begin walking the user thru a set of forms to input the required informantion. Most of this has been done using VB scripts.

I'm now at the point where the info is all ready, and I now need to write this data to a table.

I've got about 40 hrs part time into this thing already and I'm guessing about 10 more to go. I'm having a lot of fun and learning alot too.

Access is a powerful program. I'm not impressed with the HELP menus though. The example they give don't tell me which parts are variables I need to change and which are not.

I've learned the most from reading postings on this forum.

Thanks to all of you!!

Dave
 
I'm still lost!

I've looked up recordsource, recordset and addnew in ther help fils and in "Mastering Access 2000" manual. None helped.

Here's a clipping from the Access help file on Addnew:

recordset.AddNew FieldList, Values

Seems vauge to me, but if I use my example from the original posting it would look something like this?

recordset.Addnew "Dave" Name

This doesn't work, but am I close or even on the right track?


Thanks for your help,

Out of his league
 
Okay, not sure I’m on the right track…

But as said before your table should automatically update by designating the right record (control) source.

Basically what have you built your form from….a table???

If so…if you have a field say…customer name ….if you go in design view of your form and right click on this field…select properties…and in control source select the field in the table that you want to hold that particular record…

Is that any help at all????
 
My form is a textbox where the user inputs his/her name.

Now I want to append thier name to the end of my table.



I REALLY appreciate your patience with me.

Dave
 
I think I'm getting warmer?

Here's what I've got so far:
------------------
DoCmd.OpenTable "ECRlog", acViewNormal, acEdit

DoCmd.GoToRecord acDataTable, "ECRlog", acNewRec

AddNew Orginator, "dave"
-----------------

This opens my Table and creats a new record bu tthe last line isn't right.

How do I send the word "Dave" to the field "Originator" in my table?
 
do you type the word dave into a field on your form??? or do you want it standardly automated for every new record???

..if theres a few of you 'originators' you could create a drop down list for you to make a selection and that choice could be generated???

...have all the time to help...just want to make sure we're both going down the same path...!!!

Sarah
 
The user will enter his or her name. I used "Dave" as an example.

I've gotten one step closer:

DoCmd.OpenTable "ECRlog", acViewNormal, acEdit
DoCmd.GoToRecord acDataTable, "ECRlog", acNewRec
DoCmd.GoToControl "Originator"

This puts my cursor at the field "Originator".

Now if I just get the usersname from the form entered here?


If it's easier, you can email me directly at:

dpasquino@actechdrives.com
 

Users who are viewing this thread

Back
Top Bottom