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!

Message Box Containing Primary Key

Status
Not open for further replies.

paul2003abc

Technical User
Oct 12, 2003
3
GB
I am creating a database which contains customer information. What I want to do is once the record has been added using a form i want to press a command box which will save the record, open the message box and then close the form. I have worked out the save and close part. The problem is working out how to get the message box to say "New Record Added - Number X" where x is the customer id number"

Any ideas?
 
Paul:

MsgBox("New Record Added - Number " & Me.CustomerID)

Wayne
 
Here is what I have so far:

DoCmd.GoToRecord , , acNewRec
MsgBox ("New Record Added - Number " & tblCustomers.CustomerID)
DoCmd.Close

However it does not appear to be working...and ideas?
 
Using:


DoCmd.GoToRecord , , acNewRec
MsgBox ("New Record Added - Number " & Me.[CustomerID])
DoCmd.Close

It works however...the message box only says 'New Record Added - Number' (ie with the actual number missing)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top