D
DawnTreader
Hello all
access 2007.
i have 2 forms one called Issues the other HQ tracker. the first shows a list of all the issues. the second all the follow up actions taken on certainissues. when a user right clicks on cells and filters the issue list and then clicks a button i need the HQ tracker list to filter to the issues thatare showing in the issue form. i thought that i could use the forms filterproperty but the fields are not the same on both forms, only the issue ID is the same.
i have thought i could use the recordsetclone to copy into a temporary issueID table that i can then filter on the HQ tracker form, but i have no ideahow to cause the data to populate the table. i was trying this:
Set rsinsertIssues = Me.Form.sfrmissuetracker.Form.RecordsetClone
With rsinsertIssues
rsinsertIssues.MoveFirst
Do
CurrentDb.Execute "INSERT INTO utblHQTrackerFilter ( IssueID ) VALUE (" & rsinsertIssues("IssueID") & ");"
rsinsertIssues.MoveNext
Loop While Not rsinsertIssues.EOF
End With
i also thought that i could try to do this:
CurrentDb.Execute "DELETE * FROM utblHQTrackerFilter"
If Me.Form.sfrmqryIssueTracker.Form.Filter <> "" Then
MsgBox Me.Form.sfrmqryIssueTracker.Form.Filter
CurrentDb.Execute "INSERT INTO utblHQTrackerFilter ( IssueID ) SELECT qryIssueTracker.IssueID FROM qryIssueTracker WHERE '" & Me.Form.sfrmqryIssueTracker.Form.Filter & "';"
End If
DoCmd.OpenForm stDocName
basically use the filter to manage a insert by code.
niether of these approaches are working. the last one gives me the error 3061 too few parameters. expected 1. my query is using one parameter that comes from a form. that textbox can be a number or a "*" wildcard. the parameter looks like this: Like [Forms]![frmMainMenu]![txtServiceRepID]
should that not work in the code?
i am greatful for any help any one can give.
Thanks
access 2007.
i have 2 forms one called Issues the other HQ tracker. the first shows a list of all the issues. the second all the follow up actions taken on certainissues. when a user right clicks on cells and filters the issue list and then clicks a button i need the HQ tracker list to filter to the issues thatare showing in the issue form. i thought that i could use the forms filterproperty but the fields are not the same on both forms, only the issue ID is the same.
i have thought i could use the recordsetclone to copy into a temporary issueID table that i can then filter on the HQ tracker form, but i have no ideahow to cause the data to populate the table. i was trying this:
Set rsinsertIssues = Me.Form.sfrmissuetracker.Form.RecordsetClone
With rsinsertIssues
rsinsertIssues.MoveFirst
Do
CurrentDb.Execute "INSERT INTO utblHQTrackerFilter ( IssueID ) VALUE (" & rsinsertIssues("IssueID") & ");"
rsinsertIssues.MoveNext
Loop While Not rsinsertIssues.EOF
End With
i also thought that i could try to do this:
CurrentDb.Execute "DELETE * FROM utblHQTrackerFilter"
If Me.Form.sfrmqryIssueTracker.Form.Filter <> "" Then
MsgBox Me.Form.sfrmqryIssueTracker.Form.Filter
CurrentDb.Execute "INSERT INTO utblHQTrackerFilter ( IssueID ) SELECT qryIssueTracker.IssueID FROM qryIssueTracker WHERE '" & Me.Form.sfrmqryIssueTracker.Form.Filter & "';"
End If
DoCmd.OpenForm stDocName
basically use the filter to manage a insert by code.
niether of these approaches are working. the last one gives me the error 3061 too few parameters. expected 1. my query is using one parameter that comes from a form. that textbox can be a number or a "*" wildcard. the parameter looks like this: Like [Forms]![frmMainMenu]![txtServiceRepID]
should that not work in the code?
i am greatful for any help any one can give.
Thanks