Primary Key

  • Thread starter Thread starter Rush
  • Start date Start date
R

Rush

I have a dual primary key, IDNO and TIME. these 2 fields
are on a master form, which has links to a few other forms
which also have IDNO and TIME as the primary key. I am
trying to get it where I enter an IDNO and a TIME in the
master form and when i go to a linked form, the same IDNO
and TIME automatically pop up. the code im using is =
[Forms]![MasterFormName]![MasterFormField] in the Default
value section of the field's properties. This works great
for the IDNO. but for the TIME, all that shows up is
#Name?. can anyone help me? Thanks.
 
Possibly because Time is a keyword. Be aware that time is always part of a
Date and Time, even if the date isn't displayed. That said, your code should
work in the default value property of the second form, assuming you've
spelled everything correctly.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
I changed the name of the variable from TIME to INCR, and
still get the #Name? error. everything in my expression
is spelled correctly too. =[Forms]![MASTER]![INCR]. i
don't understand why it will work for the IDNO and not for
the INCR. Any suggestions?
 
#Name always comes from the control not being able to identify the control
source. Trace "INCR" (without the quotes) back through the flow of data and
see where the control source is different than the control name. The name of
a control can be different than the name of the field it is bound to, so the
FirstName field in the underlying table can be bound to a control (text box,
etc.) named; txtFirstName.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

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

Back
Top