I have a form with a few subforms, one of the subforms has a bound field that has a default as follows:
=DLookUp("Agent","tbl loc Control")
This works on normal Access 2007 but shows an #Error on the Access 2007 runtime.
Any ideas why?
#error on subform control
-
- Administrator
- Posts: 78629
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: #error on subform control
Not really, but does it work if you use
=DLookUp("Agent","[tbl loc Control]")
=DLookUp("Agent","[tbl loc Control]")
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #error on subform control
I will check it out, thank you
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #error on subform control
The subform also has a master/child link to a text box on the form which is Null, does this make a difference?
-
- Administrator
- Posts: 78629
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: #error on subform control
That shouldn't make a difference for DLookup, as far as I can tell. But the value of a link field/control on the main form shouldn't be null.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #error on subform control
Fair enough re the DLookup.
I will change the query behind the SubForm to look for the text field to be a value or a Null
I will then delete the master/child link that looks at the text field
I will change the query behind the SubForm to look for the text field to be a value or a Null
I will then delete the master/child link that looks at the text field
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: #error on subform control
This is part of a main form (Members) and subforms MembersProperties and MemberComments.
The MembersComments can relate to a Member only (if text box on main form is Null) or
if a MembersProperties record has been selected (non null text box on main form) relates to a Member and MembersProperties.
Is there another way of doing this for this situation?
The MembersComments can relate to a Member only (if text box on main form is Null) or
if a MembersProperties record has been selected (non null text box on main form) relates to a Member and MembersProperties.
Is there another way of doing this for this situation?
-
- Administrator
- Posts: 78629
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: #error on subform control
It's hard to visualize how that should work. Could you create a stripped-down copy of the database without sensitive information, zip it and attach the zip file to a reply?
Best wishes,
Hans
Hans