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

prompt user if changing customer

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
I made a form where the user chooses a customer from a combo box. Sometimes they forget to make a new Order so they are changing the customer for order number one. Of course they change everything and now Order Number 1 has been change numerous times and the previous number 1's are all gone.
so we have no record of anything.
How can I prompt for "Are you sure you want to change the customer?" so they don't do this anymore!

I tried want to save the customer name somewhere prior to them changing it but have not had any luck with Before_update, On_enter or others in the combo box..

TIA




DougP
[r2d2] < I Built one
 
How are ya DougP . . .

What if you [blue]only allow writing to a new record?[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
You can do this on the before update event of the combo.
1)Check if a new record
2)If not a new record then prompt
3)If they want to cancel then cancel the event.
 
DougP . . .
Code:
[blue]   If Me.NewRecord Then
      [green]'Prompt[/green]
   Else
      Cancel=True
   End If[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top