Conditional formating using Dlookup

Daveisalwayshere

Registered User.
Local time
Today, 10:44
Joined
Mar 14, 2014
Messages
31
Hi Guys, I have a subform named [PMQuoteQuerysubform] and in this i have a textbox named [QuoteNumber] I have this as a continuous form that I have made the Text box into a button.
What i want to happen though is the text box to be highlighted when a QuoteStatusID in the table QuoteLogT = "Approved By Manager"


My Table looks like this
QuoteLogT
QuoteNumber
SalesmanID
JobName
Location
QuoteStatusID

I have tried a few Dlookups but this is my first crack at them as i only have a month experience with Access
Here is what i thought the DLookUp would look like
DLookUp([QuoteStatusID],[QuoteLogT],"[QuoteNumber]=" & "Approved By Manager")
any help would be appreciated. When I made the subform i did change the record source from an SQL statement to the table itself because the wizard seems to do that if that makes a difference
 
Instead of using lookup, I'd just refer to the QuoteStatusID field on the subform, assuming there is one. If not, I'd at least include the field in the underlying query, and refer to that. It's a LOT faster than a DLookUp.
 
Thanks I tossed and turned last night thinking about this and thats exactly what i came up with too. i added QuoteStatusID to my query and then hid it on the subform then it was pretty easy from there
 

Users who are viewing this thread

Back
Top Bottom