From: Assistance Required via AccessMonster.com on
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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

From: BruceM via AccessMonster.com on
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.

Assistance Required wrote:
>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

--
Message posted via http://www.accessmonster.com

From: Assistance Required via AccessMonster.com on
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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1

From: Douglas J. Steele on
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...)

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Assistance Required via AccessMonster.com" <u45561(a)uwe> wrote in message
news:a887fa6ac0ce4(a)uwe...
>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
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1
>


From: Assistance Required via AccessMonster.com on
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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201005/1