Help needed with a control referencing problem (1 Viewer)

dxp

Registered User.
Local time
Yesterday, 17:04
Joined
Jun 5, 2006
Messages
62
Hi all

I have got a problem referencing some fields for a report, can anyone help solve this:

Main form with 2 subforms on tabs, subfrm1 and subfrm 2.

Subfrm1 has some controls which contain dates entered by the user. subfrm2 has some controls that are populated with the dates from subfrm1 using this code in the controls on subfrm 2 which hold the dates:

=Forms!frm_Customer_Details!Child434.Form!Cons_Date

I am trying to create a report based on subfrm2 but I can not get the dates that are held in the controls on subfrm 2 to appear, I think I am referencing the controls wrong. I hope this is understandable and any help would be appreciated.

Thanks.
 

dxp

Registered User.
Local time
Yesterday, 17:04
Joined
Jun 5, 2006
Messages
62
Hi Deninsk,thanks for the reply, unfortunatly I get #name# error, not sure whats going on here. I dont seem to be able to reference the value in subfrm2 for my report.
 

chergh

blah
Local time
Today, 01:04
Joined
Jun 15, 2004
Messages
1,414
try:

=Forms!frm_Customer_Details.Child434.Form.Cons_Date
 

dxp

Registered User.
Local time
Yesterday, 17:04
Joined
Jun 5, 2006
Messages
62
Thanks for that but srtill getting #name? error:(
 

rainman89

I cant find the any key..
Local time
Yesterday, 20:04
Joined
Feb 12, 2007
Messages
3,015
is that a space in the =Forms!frm_Customer_Details!Child434.Form!Cons_Dat e
 

dxp

Registered User.
Local time
Yesterday, 17:04
Joined
Jun 5, 2006
Messages
62
Thanks for the help but still the same #name? error problem. Getting frustrated now...!

Could it be perhaps that the value in subfrm2 control is not stored in a table?
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:04
Joined
Jul 2, 2005
Messages
13,826
The syntax you posted in the first post is the correct syntax. Something else must be going on if it does not work.
 

dxp

Registered User.
Local time
Yesterday, 17:04
Joined
Jun 5, 2006
Messages
62
Hi RuralGuy,
The controls on the subfrm2 pick up their data (date) from subfrm1 when I open subfrm 2. the values are not stored in a table ( ithink this may be the problem) My Report needs to pick up the date in the control from either sub1 or sub2. I thought it was more logical to pick up the date from sub2 because this form has data used in the report.
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:04
Joined
Jul 2, 2005
Messages
13,826
You should be able to pick up the date wherever it exists. It need not be in a field in a table.
 

Users who are viewing this thread

Top Bottom