Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie, trying to set field using vba edior. help please 1

Status
Not open for further replies.

20fva

Technical User
Dec 17, 2002
7
US
this is the code i am using to test:
(redline is higlighted in debugging due to Error 13 Type Mismatch)

Dim myField As Field
Set myField = Me.ComboRel2
If IsNull(myField) = False Then
MsgBox Str(myField)
End If

any thoughts?

Reason for this:
i have 10 fields and a lengthy after_update function assigned to each. I wanted to write a function that and use variables (including the field) so that my application is more Object Oriented.

Not Urgent. Thankyou all.

---------
Claudia
 
Here may be the trouble.

ComboRel2 is not a field. It is actually a control linked to a field. Therefore, I think what you want is more like this:

Dim myField As Control
Set myField = Me.ComboRel2
 

Wow. Quick response time. Thankyou so much for being helpful.

I figured it was something simple.

You really are an Ace.

--------
Claudia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top