E
EJO
I was hoping I could get some insight as to what is causing an error...
In an A2k Mdb, with SQL Server backend, I have been updating the record
source properties of several forms/subforms to improve
performance--probably to offset my coding skills ;P. The only form I
have had trouble with is a subform in which i need to actually change
the recordsource. The subform loads fine, but when I choose tab 2, the
field with my PK errors. If any other tab is selected, then go back to
tab 0, the PK field errors. The PK field does not error when selecting
tab 1.
The db has been in use for several months with no problem until I
changed the below:
Dim SRrecordset
Select Case Me.TabCtl37.Value
Case 0
SRrecordset = "Select * From SR Where
SiteCode=Forms!Site.Form!SiteCode;"
Me.RecordSource = SRrecordset
Me.Filter = ("((SR.Cancelled)=False) AND ((SR.Accept_Act) Is
Null))")
Me.FilterOn = True
~some additional pre-existing code~
Case 1
SRrecordset = "Select * From SR Where
SiteCode=Forms!Site.Form!SiteCode;"
Me.RecordSource = SRrecordset
Me.Filter = ("(((Sr.Cancelled)=True) OR ((Sr.Accept_Act) Is Not
Null))")
Me.FilterOn = True
~some additional pre-existing code~
Case 2
SRrecordset = "Select * From SR;"
Me.RecordSource = SRrecordset
Me.FilterOn = False
~some additional pre-existing code~
(Runtime 3070:
The Microsoft Jet Database Engine does not recognize 'SR' as a valid
fieldname or expression.)
Thanks for any assistance,
Eric
In an A2k Mdb, with SQL Server backend, I have been updating the record
source properties of several forms/subforms to improve
performance--probably to offset my coding skills ;P. The only form I
have had trouble with is a subform in which i need to actually change
the recordsource. The subform loads fine, but when I choose tab 2, the
field with my PK errors. If any other tab is selected, then go back to
tab 0, the PK field errors. The PK field does not error when selecting
tab 1.
The db has been in use for several months with no problem until I
changed the below:
Dim SRrecordset
Select Case Me.TabCtl37.Value
Case 0
SRrecordset = "Select * From SR Where
SiteCode=Forms!Site.Form!SiteCode;"
Me.RecordSource = SRrecordset
Me.Filter = ("((SR.Cancelled)=False) AND ((SR.Accept_Act) Is
Null))")
Me.FilterOn = True
~some additional pre-existing code~
Case 1
SRrecordset = "Select * From SR Where
SiteCode=Forms!Site.Form!SiteCode;"
Me.RecordSource = SRrecordset
Me.Filter = ("(((Sr.Cancelled)=True) OR ((Sr.Accept_Act) Is Not
Null))")
Me.FilterOn = True
~some additional pre-existing code~
Case 2
SRrecordset = "Select * From SR;"
Me.RecordSource = SRrecordset
Me.FilterOn = False
~some additional pre-existing code~
(Runtime 3070:
The Microsoft Jet Database Engine does not recognize 'SR' as a valid
fieldname or expression.)
Thanks for any assistance,
Eric