Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find DMax based on combo box selection 1

Status
Not open for further replies.

BrianLe

Programmer
Feb 19, 2002
229
US
In AC97, I have a table TaskLog with fields Operator and Completion Date. I would like the maximum Completion Date to show in a text box on a form for the Operator selected from cbxOperator. I've tried a number of variations of the following for the record source of the textbox but the textbox come up blank.

=DMax("[Completion Date]","TaskLog","[Operator] = '& cbxOperator &'")

Any suggestions?

Thanks,

Brian
 
You could check out the syntax in the help file. Basically, it might look like this

[tt]=DMax("[Completion Date]","TaskLog","[Operator] = '" & cbxOperator & "'")
- or
=DMax("[Completion Date]","TaskLog","[Operator] = """ & cbxOperator & """")
[/tt]

if the field Operator is text, and

[tt]=DMax("[Completion Date]","TaskLog","[Operator] = " & cbxOperator)[/tt]

if it's numeric.

Then, there's also the matter of what information is in the bound column of the combo? Usually, one would expect a numeric - the primary key of the table where you look up thise Operators.


Roy-Vidar
 
You're first one did the trick.

Thanks,

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top