Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 11th, 2003, 09:20 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question using vbOk and vbCancel in access

I have a message box with the Ok and Cancel buttons present, Ok being the default.
If OK is selected, the database prints a page. If cancel is selected the database reverts back to the original form. My code below:-
MsgBox "Place defective Item and NCR Docket on you're relevant quarantine area - OK to continue" _
, vbOKCancel + vbDefaultButton1 + vbInformation, "Deficiency Entered"

If Click = vbOK Then
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
DoCmd.OpenForm "NCR Reporting2", acNormal, "", "", , acNormal
DoCmd.Close acReport, "Scrap Ident Docket"

Else
If Click = vbCancel Then
DoCmd.Close acReport, "Scrap Ident Docket"
DoCmd.OpenForm "NCR Report3", acNormal, "", "", , acNormal
How can I get the buttons to react in the correct manner???

Reply With Quote
  #2  
Old December 11th, 2003, 11:01 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,957 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 15 h 35 m 19 sec
Reputation Power: 802
Click = MsgBox ("Place defective Item and NCR Docket on you're relevant quarantine area - OK to continue" _
, vbOKCancel + vbDefaultButton1 + vbInformation, "Deficiency Entered")

Reply With Quote
  #3  
Old December 12th, 2003, 05:38 AM
talcummalcolm talcummalcolm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 13 talcummalcolm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cheers I'll try it

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > using vbOk and vbCancel in access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT