simple qusetion i think

helen85

Registered User.
Local time
Today, 07:34
Joined
Apr 6, 2007
Messages
33
hello it my first time here, so I hoping I am in the right place, ok my question is how do you use a form and automatically enter data, for example I have a form called form1 for now, on this form there are two boxes one userID and the other name, when the user enters there name I want the userID to be found and placed in the box userID.
Both the name and userID are stored in a table called UserInfo. I know that I need to search the table and find the userID once the name is entered and then put it in the UserID box, but I don’t know how, thank you.
:p
 
if you use a combobox it will list all of them for you! and you can use the find a record on my form to show the results!
 
yeap i know that but my problem is that the user will never know there userID so they cant input it in any way.:) :confused:
Just there name which some how i need linking to the userID
 
How are your tables designed? are userID and name in the same table(i hope they are). you can make the combobox show only the user name if u want, but it can still return the userID
 
yeap there are both in the same table called user information, could you give us an example of what you mean pls, (sorry still learning) thanx
 
I need a little more info on what u are trying to do. do u simply want the user id returned?
or do you want to see the whole user information?
 
just the user1D returned when they input there name
 
as the control source for the txtbox where u want your UserID to show up
youll probably have to add a me.txtbox.refresh in the afterupdate event of your username box
 
Heres a sample of what i think u are trying to do
 

Attachments

Thank you so much it worked, i have been try to do it for 2 days, lol, thanks, i will add to your reputation, thanx
 
ok got that working fine via this,
=DLookUp("UserID","User Information","Name = '" & Forms!AddComments!Name & "'")
but is still adding the userID in the table as a different number and not the one its finding? how do i get it to add this number to the comments table?
 
ok got that working fine via this,
=DLookUp("UserID","User Information","Name = '" & Forms!AddComments!Name & "'")
but is still adding the userID in the table as a different number and not the one its finding? how do i get it to add this number to the comments table?

As a different number? It should return the value that u are showing there. Something else must be going wrong. can u post a sample?
 

Users who are viewing this thread

Back
Top Bottom