Trouble setting Temp Var

ct2013

Registered User.
Local time
Today, 19:29
Joined
Jun 6, 2013
Messages
87
Hi there,

I have a table [Employees] which has the following Fields

- TxtEmpID

- StrEmpName

- StrEmpPassword


Which I use for my login table with the following script:

If Me.txtPassword.Value = DLookup("strEmpPassword", "tblEmployees", "[TxtEmpID]=" & Me.cboEmployee.Value) Then

TxtMyEmpID = Me.cboEmployee.Value

On my form the drop down to select the employee is “SELECT tblEmployees.[TxtEmpID], [tblEmployees].[strEmpName] FROM tblEmployees; “ (Seemingly all this is based on the TxtEmpID)

When I create a Temprorary Variable [SetTempVar – screen.activecontrol with the name “SetUserID”] and then want to place the variable in a form or whatever else, I can only see the TxtEmpID. I would like to set the TempVar as the field StrEmpName.

How is this possible??

Please reply ASAP
Many thanks
 
The StrEmpName is the 2nd column of your ComboBox.
 
thanks,

it is the second column on my drop down.

how would i place it into this script?

TempVars.Add ???, "??"
 
Many thanks for your reply.

Unfortunately I cant get that code to work.

attached is my sample DB. could you possibly let me know where I am going wrong.

Thanks a mill.
 

Attachments

Sorry unsure what you mean, Is it not code?I don't think I worked on macros on my logging in for?
 
Thanks for your response,

Is it a big job for you to change this as I am happy for you to change whatever necessary to get this working.

Thanks for all your help
 
Hi there,

I have done that now, would you mind to try and look at it again.

Thanks a mil:banghead:
 

Attachments

Users who are viewing this thread

Back
Top Bottom