Rererencing a Control in a Form

J

Jan T

I am using Access 2010. I want to reference the value of a Control in
one of my forms. In a standard module I tried this; lngEmpID = [Forms]!
[frmOvertime].Form![txtEmpID] and no problems.

However, I made a Navigationform an under a Navigation button (tab), I
added my frmOvertime as a subform to the Navigation form. The code I
used before now gives me an error. OK - so I figured I have to change
code to refer to a sub Form. I then tried this:

lngEmpID = [Forms]![frmMAIN]![frmOvertime].Form![txtEmpID] but this
also gives me an error?

Any help here will be very much appriciated! Thanks in advance!

Regards
Jan T.
 

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