vba
Microsoft Office TrainingThe UK's Number 1 for Microsoft Office Training Sitemap add this page to your favourites/bookmarksBookmark page
 
view a printable version of this pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Vba

Vba

resolvedResolved · Medium Priority · Version 2003

replyReplyWed 6 Jan 2010, 07:23Delegate Joanne said...

Vba

Hi I a code to print out a report sheet but I needed the code to check that the results are correct first and if not then tell the user to select a different check box. Well the code does that as far as tell the user to select the correct box but when you select the correct box the code does not do enthing? Can some one help please.
'------------------------------------------------------------
' PRINT_REPORT
'
'------------------------------------------------------------
Function PRINT_REPORT()
On Error GoTo PRINT_REPORT_Err

With CodeContextObject
If (.CheckChoice = 1 And .RingAppr = "Not Approved") Then
Beep
MsgBox "1st Off Not Approved please select SETTING tick box", vbExclamation, "NOT APPROVED"
End If
Exit Function
DoCmd.Close acForm, "ENTER DATA"
DoCmd.OpenReport "Inner Ring Result page", acViewPreview, "", "", acNormal
DoCmd.PrintOut acPages, 1, 1, acHigh, 1, True
DoCmd.Close acReport, "Inner Ring Result page"
DoCmd.OpenForm "Switchboard", acNormal, "", "", , acNormal
End With


PRINT_REPORT_Exit:
Exit Function

PRINT_REPORT_Err:
MsgBox Error$
Resume PRINT_REPORT_Exit

End Function

For upcoming training course dates see: Pricing & availability

replyReplyWed 6 Jan 2010, 10:41Trainer Stephen said...

RE: vba

Hi Joanne

A first glance shows that your exit function command is outside of the block IF. Therefore it runs regardless of the selection.
Place it inside the block iif and see if this solves the problem

Any further problems please get back to me

Regards

Stephen

Tue 12 Jan 2010: Automatically marked as resolved.

 

 

Please browse our web site to find out more about
access+course and other Microsoft training courses.

Access tip:

Change The Default Font in Access 2003

You can change the default font in Access 2003 so that whenever you create a new database your preferred font is automatically set.

To change the default font:

1.From the menu bar select Tools.
2.Click Options.
3.Go to the Datasheet tab:
4.In the Default font section select your preferred font from the list of fonts e.g. Arial.
5.Select your preferred size from the size menu e.g. 12.
6.Click Apply.

Click on the Tables/queries tab:
1.In the Query Design font section select your preferred font from the list of fonts e.g. Arial.
2.Select your preferred size from the size menu e.g. 12.
3.Click Apply.
4.Click OK.

The default font for Access has now been changed.

View all Access hints and tips

forum postHow to create an external link

» Forum post: External link


Rate this page:
2.2/5 (213 votes cast)
Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses
Microsoft Certified Partner
Security Seal verified by visa, mastercard securecard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Management training

Professional Skills courses
Project Management Course London
Project Management Courses London
Project Management Training London
Project Management Training
Project Seminar
Project Seminars
Time Management Course London
Time Management London
Time Management Courses London
Time Management Training London
Introduction to Finance course
Assertiveness Skills course
Effective Communications Skills training
Presentation Skills London

Training Formats

Public scheduled courses
On-site training
Closed company courses

Consultancy
Application Development

Blogs

Excel Training
MS Project Training
Microsoft Training Blog

Version differences

Office 2010 vs 2007
MS Project version differences

Training Information

London Computer Training
Computer Training London
Docklands Training Courses
Docklands Training London

Training venues London
Client list
FAQ
Pricing and availability
Course details / Syllabus

Training Articles
Training Information

Microsoft training

Microsoft Office training
& IT Applications

Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training
MS Project courses
MS Project training
Outlook courses
PowerPoint courses
PowerPoint training
VBA courses
Word courses
Microsoft.training
(more...)

Excel Training

Excel courses
Excel Training Courses Medway
Autonumber in Excel
Microsoft Excel training
Basic Excel Courses
Basic Excel Course
Basic Excel Training

Interested in MS Access training?

Access courses
Microsoft Access training
Microsoft access courses
Microsoft training access course
Microsoft+access+training
Access courses in london

Training provider

Training providers
IT training companies
IT training providers
Management Training providers
Management Training provider

Event history, feedback results
Events in 2012 · 2011 · 2010 · More

See also

Crystal Reports training