Form Query Expression Match (1 Viewer)

burrina

Registered User.
Local time
Today, 02:50
Joined
May 10, 2014
Messages
972
I am having trouble with this one. I'm sure it's simple but it eludes me at the moment.
'They Don't Match !

DocPay: CCur(Nz([AbsenceHrsID])) 'InQuery

If Me.cboReason = "UnExcused" Then 'Calculate Docked Time if UnExcused.OnForm'AfterUpdateEvent of AbsenceTypeID
Me.[DocPay] = cboHrs * txtpayrate
ElseIf Me.cboReason = "Excused" Then
Me.[DocPay] = Null
End If

cboReason is a Combobox bound to AbsenceTypeID that uses Column(1)

In English I need for DocPay to ONLY show a value if cboReason (AbsenceTypeID.Column(1)) is "UnExcused"
For Both form and query.

I resolved the issue by binding the control.

Thanks,
 
Last edited:

namliam

The Mailman - AWF VIP
Local time
Today, 09:50
Joined
Aug 11, 2003
Messages
11,695
I am sure that you are not storing the actual text value but rather its ID... so you either need to use the ID or join the proper table to be able to use the text.

Possibly you are using a lookup field in your table, which may be at the root of your thinking this value is there. Using lookup fields is prown to cause these kind of things and is generaly a bad idea and/or bad practice.
 

burrina

Registered User.
Local time
Today, 02:50
Joined
May 10, 2014
Messages
972
Thanks for the suggestion.
 

Users who are viewing this thread

Top Bottom