If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Adding Records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-04, 05:15
NervousHamster NervousHamster is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
Unhappy Adding Records

I have several fields on a form and I need to be able to add the info from the fields to an existing table (in access 2000) as a new record. For example: Take the info from Text1 & Text2 and put it as new record in the table called 'Jobs' under the fields 'Received Date' (for text1) and 'Received Time' (for text2). I pretty much need to know how to access a table (add records, remove records, update/change records), but without having the table linked to the form or text boxes. Hopes this makes sense I'm not a noob, but certainly not an expert. Any help/insight will be appreciated. thanks
Reply With Quote
  #2 (permalink)  
Old 02-04-04, 09:16
vududoc vududoc is offline
Registered User
 
Join Date: Jul 2001
Location: NC
Posts: 102
Dear Nervous

The sequence is: (1) Enter data into form, where everything is considered as characters. (2) press submit button on form to dump form data to program variables. (3) convert into dollars, volumes, counts into numbers, convert date and time into appropriate format, check for completeness and correctness of data. (4) Write SQL statement to input variables into database. You may also want to add extra data, such as date and time stamping to the SQL statement. (5) open connection to database with MSJet or ODBC (6) Execute SQL statement using ADO with exception checking in case of problems. (7) close connection (8) advise user data written into database, (9) clear form.
Reply With Quote
  #3 (permalink)  
Old 02-04-04, 09:45
NervousHamster NervousHamster is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
I've actually just got it workin about five mins ago, thanks anyway though
Reply With Quote
  #4 (permalink)  
Old 02-21-04, 12:38
rami.haddad rami.haddad is offline
Registered User
 
Join Date: Jan 2004
Posts: 184
Re: Adding Records

Try this control featured on download.com that I have been using that has made my life easier:

http://www.geocities.com/scirocco_ha/DataControl.htm

I bind my controls and that is it All the complexities of ADO are hidden from the user which is you.

Then I can Navigate, Add New, Delete, Refresh, Search and Save Changes to my recordsets without any other code. That is really it, no other code is needed.

This works in any environment VB, Access, VC++ etc...

Let me know what you think.

Quote:
Originally posted by NervousHamster
I have several fields on a form and I need to be able to add the info from the fields to an existing table (in access 2000) as a new record. For example: Take the info from Text1 & Text2 and put it as new record in the table called 'Jobs' under the fields 'Received Date' (for text1) and 'Received Time' (for text2). I pretty much need to know how to access a table (add records, remove records, update/change records), but without having the table linked to the form or text boxes. Hopes this makes sense I'm not a noob, but certainly not an expert. Any help/insight will be appreciated. thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On