Custom message boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way in MS ACCESS to create a custom message box that will display certain variable data instead of jus
fixed text? I want to be able to display back to a user a confirmation message similar to this

"You are about to ship SN#123 to location ABC. Are you sure you want to continue?

Where SN#123 varies according to the user input and location ABC is variable as well

Thanks in advance for any help anyone can offer
By the way, all the help I have received on this forum has been great! There are some really expert people here
 
Mfg2529,

Depends where you want the message box to find the values. If it's in
the current record of the form from which you are triggering the macro
(this would be by far the most usual scenario), then you use this...
="You are about to ship SN#" & [SN] & " to location '" & [Location] & ".
Are you sure you want to continue?" Otherwise, can you please explain
how you are identifying the SN and the location?
 
Hi Steve again

I have a list of locations in a table for each SN so when the user enters SN1, I have a query that will look up the S
that the user entered and the corresponding location (only 1 location per SN in the table). I kablnow how to create a macro to go query the SN in the the table but don't know how to have the message box say to the user "You are about to ship SN1 to Seatle, are you sure you want to continue?

Thanks for any help in advance Steve.
 
Mfg2529,

There are a number of ways of approaching this. Here's one way that
would be neat... make a query based on your table that just includes
the SN and Location fields. On your form, put an unbound combobox, and
set the Row Source of the combobox to be the query. Let's say you call
the combobox ShipSN. Set the Column Count property of the combobox to
2. Now, have the user type the required SN into this combobox instead
of a into a textbox, which I presume was the case before. Then, the
message for your MsgBox will be...
="You are about to ship SN " & [ShipSN] & " to location '" &
[ShipSN].[Column](1) & "'"
 
Hi Steve

Thanks again for your help on this!

What you suggested is a really neat idea! I never thought to do it that way, I have displayed other columns of dat
for a combo box before in other fields. I will try this and let you know

Thanks a million for the help again
God, I am so glad MS has this forum or it would take me forever to figure these funky things out!
 
Back
Top