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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup msgBox in Access

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to popup a message box when the contents of a combo box change. These messages are stored in a table in the same database. How do I display the result of this query in the message box ??? (I can trigger the msgBox but dont know how to display the result)

Thanks in advance :)
 
Hi,

You should provide some of your code but if I understand you correctly you want to display a string field which contains your message in a message box. It is like this:

msgbox rs!strMessage,,"Displaying a message"

where rs is your recordset object and strMessage is the field that contains your message.

Have a good one!
BK
 
You can concatenate just about anything into the message box text you'd like. This can include fields from the underlying recordset or any domain aggregate function including DLookUp(). So in your case if the query includes a pointer to the selection of the combobox you can DLookUp() using this pointer.

MsgBox "Your message here " & DLookUp("[FieldToDisplay]", "qryLookupQuery", "[ComboboxValue] = " & Me.ComboboxName), vbInformationOnly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top