Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3
This is the forum to discuss the Wrox book Access 2007 VBA Programmer's Reference by Teresa Hennig, Rob Cooper, Geoffrey L. Griffith, Armen Stein; ISBN: 9780470047033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 22nd, 2007, 12:23 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 13 - Forms as objects

I am trying to use this code , and I cannot get the code in the calling form to wait for the dialog form to return the values so I can use them. It immediately runs all the code, does the Case Else statement and only then switches to the dialog form. I set the dialog form as modal, but that does not help.
Here is the calling code:
This is in the declaration section

Option Compare Database
Option Explicit
Private WithEvents dlg As Form_dlgMyDialog
Public VarReturn1 As Variant
Public VarReturn2 As Variant
Private Sub dlg_finished(VarReturn1 As Variant, VarReturn2 As Variant)
VarReturn1 = VarReturn1
VarReturn2 = VarReturn2

End Sub


This is in the command button:
Private Sub cmdselect_click()
Set dlg = New Form_dlgMyDialog
dlg.Visible = True
    Select Case varReturn1
  Case 1
    DoCmd.OpenReport stDocName, acPreview, , "Not tblMiscDetails.txtMechanech='ú'"

    Case 2
    DoCmd.OpenReport stDocName, acPreview, , "tblMiscDetails.txtMechanech= 'ú'"
    Case 3
    DoCmd.OpenReport stDocName, acPreview
  Case Else
  MsgBox "Wrong Choice"
  End Select


Thanks
Zave

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 13 - MVC omarosa BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 10 March 25th, 2009 12:00 AM
Chapter 13 bwoll BOOK: Beginning Access 2003 VBA 1 June 7th, 2007 03:57 PM
Chapter 13 ElMorenito BOOK: Beginning ASP 3.0 0 January 14th, 2005 02:56 PM



All times are GMT -4. The time now is 10:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.