Load Image Timing

  • Thread starter Assistance Required via AccessMonster.com
  • Start date
A

Assistance Required via AccessMonster.com

hihi,,

I have a button that will load a image, however this button also loads a
inputbox..

I keep getting the inputbox 1st and after input by user, the image loads..

i require the image to load 1st and then the input box..

i understand that the inputbox will be covering the image
 
B

BruceM via AccessMonster.com

It would help if you post the code. Is there a connection between the input
box and the image?

In general, you can use DoEvents to allow the code to "catch up", but that
may not be the problem. To use DoEvents, just place it on its own line.
 
A

Assistance Required via AccessMonster.com

I have trim the code abit for easy understanding,

=========================================================================
Private Sub Form_Load()

Dim strImagePath As String
strImagePath = [Forms]![form_Unit-ProductInformation]![subform_QualityPoint-
Appearance-Results]![Path]

If Len(Dir(strImagePath)) = 0 Then
strImagePath = strNoImagePath
End If

Image.Picture = strImagePath

If ![Contents] = "Scan Motor QR Code" Then
Call ScanMotorQRCode
endif

End Sub
=========================================================================
Private Sub ScanMotorQRCode()

Dim strMotorQR As String
strMotorQR = InputBox("Input Motor QR:", "INPUT REQUIRED")

End Sub
 
D

Douglas J. Steele

Try putting the line

DoEvents

directly before the line

If ![Contents] = "Scan Motor QR Code" Then

Incidentally, your routine ScanMotorQRCode doesn't look as though it's going
to do anything useful. While you're assigning the results of the call to the
InputBox function to the variable strMotorQR, since that variable is
strticly internal to the sub, its value isn't available anywhere else. (Of
course, you did mention that you'd trimmed down the code before posting, so
perhaps this isn't an issue...)
 
A

Assistance Required via AccessMonster.com

i tried but still the same..

I got a work around.. place a invisible text box in the image

when required, make the text box visible and prompt for input

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top