Problems with a SubForm (1 Viewer)

twcaddell

Registered User.
Local time
Today, 01:00
Joined
Apr 8, 2013
Messages
31
I have a problem with a subform that is used on two separate tabs. Subform names are:
Tab2EstimatedActualDelta and Tab1EstimatedActualDelta
The forms show data in Table Format

I've developed the code that changes the recordsource depending on the tab selected. It is:
Code:
Private Sub MainFormTabCtl_Click()
If Me!MainFormTabCtl.Value = 2 Then
 
   Me!Tab2EstimatedActualDelta.Form.RecordSource = "1733_EOM Query 2"
 
ElseIf Me!MainFormTabCtl.Value = 1 Then
 
   Me!Tab1EstimatedActualDelta.Form.RecordSource = "1721_EOM Query"
End If
End Sub
When I open the db, one of the two forms has the error "#Name?" in a Field called TotalImages. Both queries used for the subform recordsource have a field with the same name. The only way to get the data to show correctly is to go into the "LayOut" View and change the Recordsource for that field from TableImages to TableImages. Both forms will display data correctly until the next opening and again, one of the two forms has the error.

Anyone have any ideas?

Thanks
TC
 

twcaddell

Registered User.
Local time
Today, 01:00
Joined
Apr 8, 2013
Messages
31
Well, I did it again. Didn't look at the code and DB carefully enough. One Query has TotalImage, the other TotalImages. Sorry to waste the bandwidth
 

Mihail

Registered User.
Local time
Today, 09:00
Joined
Jan 22, 2011
Messages
2,373
Answer me, please:
Your queries are identically as structure ?
Is there any difference between the queries except the name and the Where clause ?
 

twcaddell

Registered User.
Local time
Today, 01:00
Joined
Apr 8, 2013
Messages
31
Mihail
I forgot to mark this post as solved. My apologies. I had spelled the fieldnames differently.
Thanks for replying
TC
 

Users who are viewing this thread

Top Bottom