473,811 Members | 2,869 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserting collected data into a access database

3 New Member
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 1940
mousewonders
3 New Member
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
mousewonders
3 New Member
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
3437
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 could use inside this console application to make sure the MS SQL database is operational before I perform the insert?
1
1291
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 central access database.Is there a function or a module that could do this automatically.
1
4144
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
4383
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 procedure(assume there are many columns in the table). I need to insert data into two separate tables, the relation between these two tables is 1 row of data in table1 could have multiple rows in table2 related to table1, but if the data insertion into...
3
3369
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 records to a data base,for which i am using Typed dataSet.(I used DataSet Designer to create one) Then created a table adapter in which i have written query for INSERT , & set Database Direct property to true.(I didnt use a seperate methods for...
20
3024
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 file is to be read into my java program and then inserted (from the program into an Access Database). I am not exactly sure of where the problem lies. I know it has something to do with how I am parsing the file, or how I am passing my arguments to...
0
1660
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 through and inserting one row at a time is very expensive. Does anyone know a fast way with low overhead to accomplish this task. I have been working in this direction (code below) however the code inserts 0 rows into the access database. ...
6
11771
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 contents of the form is inserted into the MS Access database. The Customer table in the database already has 30 records (with CustomerIDs 1 - 30) in it (from when the database was first created). The CustomerID field in the database is an...
2
3121
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 record. My code inserts records one by one using addnew-updatebatch. If there is a duplicate in the db, it will display "already exists" and if it is not in the db it will display "record added". Below is my asp code I found on the net and...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10393
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10124
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4334
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.