|
-
Sep 1st, 2000, 10:07 PM
#1
Thread Starter
Hyperactive Member
I have a Microsoft Access Version 7 Dtabase Called "Users"
Inside it is 1 Table with 2 fields 1 called "Nick" the other called "IPNumber" I have 2 text boxes that are linked to it on the form . The question is how can I add the text in those 2 boxes to the apropriate Feild in it Through Code ? I Can't have the user enter it manually . I nned basicaly an On Click add this user and IP to the DB .
Any Help would be appreciated . Thanks guys
[]Private[]
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
-
Sep 2nd, 2000, 02:29 AM
#2
Lively Member
******** A brief sample how to display data in textboxes
sql = "select user,ip from table_name"
rs.open sql, objconnection
txtUser.text = rs!user
txtIP.text = rs!ip
******** How to insert a new record into the DB
private sub cmdAdd_click()
sql = "insert into table_name (user,ip) " _
& "values('" & txtUser.text & "'," _
& txtIP.text & ")"
objcommand.commandtext = sql
objcommand.commandtype = adcmdtext
objcommand.activeconnection = objconnection
objcommand.execute
Hope you got an idea...
-
Sep 2nd, 2000, 07:00 AM
#3
Thread Starter
Hyperactive Member
Visual Basic 6 SP4 on win98se
QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|