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

pop up "Do you really want to window" ...

Status
Not open for further replies.

MBall2003

Programmer
Joined
May 30, 2003
Messages
61
Location
US
I have a button on my form Add Employee when i click on this , i automatically generate the Employee id. and it creates a new record for an employee , if i click on the close button i dont want that employee showing up in the table tblEmployees, is there an easy way to prevent a new record from being made automatically I'm really new to access and any help would be appreciated thanks


mball
 
In the code before you call the new window to create the employee....put:

Dim strMsg As String

strMsg = MsgBox("Are you sure you want to create a new employee?", vbYesNo, "New Employee?")

If strMsg = vbNo Then
Exit Sub
Else
' you code goes here
End If

****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top