-
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]
-
Is my question so difficult or was my explanation not correct?
-
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
-
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
-
PETER:
You should tell us in the future if you are using ADO or DAO, for some reason we have a hard time reading minds.... :)