J
Jack Leach
.....
A2K3 on XP Pro, current updates
I've got a form opened acDialog, and for some reason it is not accepting any
mouse or keyboard input. You can move the mouse around, see the buttons
highlight as you move over them, but clicking does nothing. Tabbing does
nothing. You can grab the titlebar and move the form, but the only available
item on a right click is Form Design (which is how I have to close it at this
point).
I've checked all the form properties... nothing seems amiss.
As of yet, I haven't tried importing or remaking this form. I'm hoping it's
something I'm missing. I can step through every line of code from the
hbtnPrint click to the end of all the Open procedures for frmPrintDialog...
there's nothing hung up codewise that I can tell. I've verified that my tab
order doesn't start on a disabled or invisible control for the problem form.
All data-related properties for the problem form and it's controls are
unbound. I'm out of ideas...
What I'm trying to do is set up a global print dialog for my app. So
there's a little more going on behind the scenes than usual. The form is
being opened as acDialog from a standard module. Here's a process rundown...
-User clicks print button from frmCompanies
-hbtnPrint calls public function InitPrint an passes these arguments
-ReportName
-ReportType (list based or record based)
-List of records if a record based report
-Public InitPrint does some calculations and sets a few globals
-Public InitPrint opens frmPrintDialog in acDialog mode
-frmPrintDialog opens and performs these operations
-verifies an openarg was passed
-fills a listbox with a list of available printers
-selects the default printer in the list box
-hides/shows record selector listbox/buttons based on type
The only other thing I'm wondering if is there's some problem with my
prodecure for filling the listbox with the printers and selecting the
default. The listbox is set to Value List, but oddly enough, I don't see a
property for MultiSelect? I thought there was supposed to be one, but I
don't see it. I don't want multiselect here anyway, but this came across as
odd.
Here's the procedure:
Dim lDefaultPrinter As Long 'index of default printer
Dim lCount As Long 'counter for printers (index)
Dim prt As Printer
'=========================
'populate list and retain index of windows default
lCount = 0
For Each prt In Application.Printers
Me.ctlPrinters.AddItem (prt.DeviceName)
If prt.DeviceName = Application.Printer.DeviceName Then
lDefaultPrinter = lCount
End If
lCount = lCount + 1
Next
Set prt = Nothing
'select default
Me.ctlPrinters.Selected(lDefaultPrinter) = True
I'm at a loss.... anyone see anything?
thanks,
--
Jack Leach
www.tristatemachine.com
"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
A2K3 on XP Pro, current updates
I've got a form opened acDialog, and for some reason it is not accepting any
mouse or keyboard input. You can move the mouse around, see the buttons
highlight as you move over them, but clicking does nothing. Tabbing does
nothing. You can grab the titlebar and move the form, but the only available
item on a right click is Form Design (which is how I have to close it at this
point).
I've checked all the form properties... nothing seems amiss.
As of yet, I haven't tried importing or remaking this form. I'm hoping it's
something I'm missing. I can step through every line of code from the
hbtnPrint click to the end of all the Open procedures for frmPrintDialog...
there's nothing hung up codewise that I can tell. I've verified that my tab
order doesn't start on a disabled or invisible control for the problem form.
All data-related properties for the problem form and it's controls are
unbound. I'm out of ideas...
What I'm trying to do is set up a global print dialog for my app. So
there's a little more going on behind the scenes than usual. The form is
being opened as acDialog from a standard module. Here's a process rundown...
-User clicks print button from frmCompanies
-hbtnPrint calls public function InitPrint an passes these arguments
-ReportName
-ReportType (list based or record based)
-List of records if a record based report
-Public InitPrint does some calculations and sets a few globals
-Public InitPrint opens frmPrintDialog in acDialog mode
-frmPrintDialog opens and performs these operations
-verifies an openarg was passed
-fills a listbox with a list of available printers
-selects the default printer in the list box
-hides/shows record selector listbox/buttons based on type
The only other thing I'm wondering if is there's some problem with my
prodecure for filling the listbox with the printers and selecting the
default. The listbox is set to Value List, but oddly enough, I don't see a
property for MultiSelect? I thought there was supposed to be one, but I
don't see it. I don't want multiselect here anyway, but this came across as
odd.
Here's the procedure:
Dim lDefaultPrinter As Long 'index of default printer
Dim lCount As Long 'counter for printers (index)
Dim prt As Printer
'=========================
'populate list and retain index of windows default
lCount = 0
For Each prt In Application.Printers
Me.ctlPrinters.AddItem (prt.DeviceName)
If prt.DeviceName = Application.Printer.DeviceName Then
lDefaultPrinter = lCount
End If
lCount = lCount + 1
Next
Set prt = Nothing
'select default
Me.ctlPrinters.Selected(lDefaultPrinter) = True
I'm at a loss.... anyone see anything?
thanks,
--
Jack Leach
www.tristatemachine.com
"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)