Re: ID mixing with all records
- From: "Jeff Boyce" <nonsense@xxxxxxxxxxxx>
- Date: Mon, 19 Mar 2007 11:12:34 -0700
Nick
Still seems like a "how" question ... how to programmatically remove the
OpenArgs. Please describe the "what"... what is it that you are trying to
accomplish. I ask because there may be more than one way to get your job
done...
Regards
Jeff Boyce
Microsoft Office/Access MVP
"Nick X" <Nicknnator (no) @ (spam) aol.123com> wrote in message
news:725C469B-E7DB-400E-A9E2-78A08A2AA6E7@xxxxxxxxxxxxxxxx
OK, all the answer are staring me in the face today, and all I can do is
stare blankly back. The problem was with the :
Private Sub Form_Current()
If Not IsNull(Me.OpenArgs) Then
Me.JobID = Me.OpenArgs
End If
End Sub
I just didn't take the time to re-open the form after I commented out the
code.
Is it possible to programmatically remove the openargs?
Thanks,
NickX
"Jeff Boyce" wrote:
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
- References:
- ID mixing with all records
- From: Nick X
- Re: ID mixing with all records
- From: Jeff Boyce
- Re: ID mixing with all records
- From: Nick X
- ID mixing with all records
- Prev by Date: Re: Please help!
- Next by Date: RE: Date changing 2028....2029......1930???????
- Previous by thread: Re: ID mixing with all records
- Next by thread: Re: ID mixing with all records
- Index(es):
Relevant Pages
|