Re: ID mixing with all records
- From: "Jeff Boyce" <JeffBoyce_IF@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 19 Mar 2007 07:06:34 -0800
Nick
You've described the "how" ... now, how 'bout the "what". Since queries and
forms and reports are all based on the underlying data, please describe your
table structure and data types.
--
Regards
Jeff Boyce
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
Microsoft Registered Partner
https://partner.microsoft.com/
"Nick X" <Nicknnator (no) @ (spam) aol.123com> wrote in message
news:7D4C56E1-06B8-4C4A-AC2E-F5BD6B00169A@xxxxxxxxxxxxxxxx
Hi all,(Company
I am having an issue with my form when I apply a filter. The filter is
working as expected, until you look at the KeyID or the UtilityAlias
Name). The problem is that when you run this code:(((tblCuts.Address1)
Private Sub cboStreetNames_AfterUpdate()
' Find the record that matches the control.
On Error GoTo cboStreetNames_AfterUpdate_Err
If chkAllUT = True Then
DoCmd.ShowAllRecords
Me.cboStreetNames.Requery
DoCmd.ApplyFilter "qSearchStreet"
Me.cboStreetNames.Requery
Else
DoCmd.ShowAllRecords
Me.cboStreetNames.Requery
DoCmd.ApplyFilter "qSearchStreet", "JobID = " & Me.JobID
Me.cboStreetNames.Requery
End If
cboStreetNames = ""
chkAllUT = False
DoCmd.GoToControl "cboStreetNames"
cboStreetNames_AfterUpdate_Exit:
Exit Sub
cboStreetNames_AfterUpdate_Err:
MsgBox Error$
Resume cboStreetNames_AfterUpdate_Exit
End Sub
If chkAllUT = True then it should show everything, which it does, but with
the wrong KeyID.
This is where I kinda suspect the problem to be:
Private Sub Form_Current()
If Not IsNull(Me.OpenArgs) Then
Me.JobID = Me.OpenArgs
End If
...
But when I remove this code it still does the same thing.
my combo box filters against several fields:
SELECT tblCuts.Address1, tblCuts.StreetName, tblCuts.From, tblCuts.To,
tblUtilities.UtilityAlias, tblCuts.JobID, *
FROM tblUtilities INNER JOIN tblCuts ON tblUtilities.KeyID = tblCuts.JobID
WHERE ((([Forms].[fCuts].[cboStreetNames]) Is Null)) OR
Like "*" & [Forms].[fCuts].[cboStreetNames] & "*")) OR(((tblCuts.StreetName)
Like "*" & [Forms].[fCuts].[cboStreetNames] & "*")) OR (((tblCuts.From)Like
"*" & [Forms].[fCuts].[cboStreetNames] & "*")) OR (((tblCuts.To) Like "*"&
[Forms].[fCuts].[cboStreetNames] & "*"))
ORDER BY tblCuts.DateCalled DESC;
Sorry, a lot to take in.
Please help
Thanks,
NickX
.
- Follow-Ups:
- Re: ID mixing with all records
- From: Nick X
- Re: ID mixing with all records
- From: Nick X
- Re: ID mixing with all records
- References:
- ID mixing with all records
- From: Nick X
- ID mixing with all records
- Prev by Date: Re: Report Formatting and Printing HELP HELP?
- Next by Date: Re: Duplicate Records Using Access 2000
- Previous by thread: ID mixing with all records
- Next by thread: Re: ID mixing with all records
- Index(es):
Relevant Pages
|