Computing.Net > Forums > Programming > VB Run Time Error '2185'

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB Run Time Error '2185'

Reply to Message Icon

Name: John
Date: September 16, 2002 at 09:17:26 Pacific
OS: Windows 98
CPU/Ram: Intel 400Mhz and 256MB of
Comment:

"Run-time error '2185'.
I am getting this error:
Microsoft Access:
Run Time Error '2185'

"you can't reference a property or method for a control unless the control
has the focus."

My code is below:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Left(Label_TAG.Text, 4) "ADA-" Then
Label_TAG.Text = "ADA-" & Label_TAG.Text
End If
End Sub



Sponsored Link
Ads by Google

Response Number 1
Name: madman
Date: September 17, 2002 at 13:49:57 Pacific
Reply:

Sounds like you might be trying to access an object before the form has initialized/loaded. have you looked in MSDN for the error?


0

Response Number 2
Name: Steel
Date: September 20, 2002 at 16:01:16 Pacific
Reply:

You must delete the ".text"-property. Access only wants to use properties, if it has the focus. You could also give it the focus.

Good luck!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB Run Time Error '2185'

VB run-time error 1004 with SQL www.computing.net/answers/programming/vb-runtime-error-1004-with-sql/18664.html

Run time Errors in VB www.computing.net/answers/programming/run-time-errors-in-vb/3981.html

MSaccess and Activex run time error www.computing.net/answers/programming/msaccess-and-activex-run-time-error/11137.html