473,396 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Inserting collected data into a access database

Hi Guys,

I am very new to VB. I am working on a project for class that will let people sign in to a fitness center and sign out.

I have no clue what I am doing. I have searched and read and read and I can't seem to figure out how to insert data that I collect on a form I created into an Access database.

I know I can do it if I drag and drop the tables onto the form but I need for the form to make sure the user exists before submitting the data. Here is the project

Access Database 3 Tables
WhoIsHere
Users
History


The WhoIsHere table has three fields:
UserID
TimeIn
DateIn

Users table:
UserID
Firstname
Lastname
EmpRelation

History table
UserID
TimeIn
DateIn
TimeOut
DateOut

Now, I have created 4 forms

A welcome form which shows a Sign In and a Sign Out and a Register Button

Sign In
One textbox (for the user to scan the ID) this is where I am stuck... I need upon scan to make sure the user exists by looking up the ID in the Users Table and if they do exist I need them inserted into the WhoIsHere Table with the date and time.

My goal is to move the record from the WhoIsHere upon signout to the History table and insert a time out.

Can someone please help me out? If I can see how this is done I should be able to figure out how to do the rest.

I would be willing to pay for some help if need be. Just let me know. I work best from examples.

Richard
Sep 8 '07 #1
2 1924
Why doesn't this work? I have this assigned to a button:

Expand|Select|Wrap|Line Numbers
  1. Dim con As New OleDb.OleDbConnection
  2.         con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\leightr\My Documents\Visual Studio 2005\Projects\cma\cma\culverflex.mdb"
  3.         Dim da As OleDb.OleDbDataAdapter
  4.         Dim signInNow As String
  5.         con.Open()
  6.         signInNow = "INSERT INTO `whoishere` (`userid`, `timein`, `signdate`) VALUES (10, 12:00:30 PM, 12/22/81)"
  7.         da = New OleDb.OleDbDataAdapter(signInNow, con)
  8.         con.Close()
Sep 8 '07 #2
Well, I have figured out how to insert the data from a form into Access.

Now I need help with:


How do I look up a record based on input of a textbox (userid) and move it to another table?
Sep 8 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jared Evans | last post by:
I developed a console application that will continually check a message queue to watch for any incoming data that needs to be inserted into MS SQL database. What would be a low-cost method I...
1
by: Vic | last post by:
We collect data from external contractors that is supplied on floppy or Cd in an access mdb file. these files have the same structure but have different names.We wish to upload this data into a...
1
by: Azel | last post by:
Hi, I am trying to learn ADO.net and I keep running into problems trying to insert data into my Access Database: data.mdb. here is my code: <code> // Database Variables
11
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store...
3
by: Surya | last post by:
Dear All, I have problem on inserting a record to database..Although it looked easy.. i have caught up with following issue .. please go ahead and help me to find solution I Need to insert...
20
by: dav3 | last post by:
Alright folks I am in need of a lil guidance/assistance here. I have a program which reads in a txt file. This txt file contains lines of the form January 3, 2007, 85.8 Now each line of the txt...
0
by: SL Culby | last post by:
Hello everyone, I have a project where I pull SQL Server data put it into a dataset and now I have to put the dataset data into an Access Database. The dataset currently is over 2000 row, so looping...
6
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the...
2
by: hakkatil | last post by:
Hi to all, I have a page that inserts excel sheet to access database. I am using asp. What I want to do is to check the inserting record if it is in the database. Basicly checking the dublicate...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.