|
-
Dec 31st, 1999, 07:18 PM
#1
Thread Starter
New Member
I've craeted a form on which I've 3 fields. In the first field I want to type data, I've used the Keypress function to format my string e.g. "4" becomes "000004", when I type "1" my string becomes "000041". That also what I wanted.
What I'm looking for a function or a piece of code in which I can directly search my database for the excistence of the typed key and if found display 2 fields from this database in the field 2 and 3
If you like I can e-mail you a part the code I've created up until now.
Regards, Peter
[email protected]
-
Jan 2nd, 2000, 08:51 AM
#2
Thread Starter
New Member
Is my question so difficult or was my explanation not correct?
-
Jan 2nd, 2000, 10:07 AM
#3
I haven't tested this, but it should work.
Code:
Dim ssMySnapshot As Snapshot
Set ssMySnapshot = DB.CreateSnapshot("Select * From Mytable where MyKey = '" _
& Text1.Text & "'")
Text2.Text = ssMySnapshot.datafield1
Text3.Text = ssMySnapshot.datafield2
------------------
Marty
-
Jan 2nd, 2000, 05:36 PM
#4
Thread Starter
New Member
Hello Marty,
To begin all the best for 2000.
Thanks for your reply(s).
The sample you sended is for 'old' ADO's said VB6.
But you helped me with this anyway. I've found another example in MSDN via the help topic on this 'old' ADO.
Regards, Peter
-
Jan 3rd, 2000, 01:18 AM
#5
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
|