Hey so my grand idea is to have a subform where the user can past in multiple account numbers and then the code will remove rows with this account number from the table.
I am having trouble setting the AccountsSubform recordset equal to what is entered into the form. This is what I have currently:
**all other declarations
Dim AccountsSubform As RecordSet
Me.SubscriptionRemovesSubform.Form.Refresh
Set AccountsSubform = Me.SubscriptionRemovesSubform.Form.RecordsetClone
With AccountsSubform
Do While Not AccountsSubform.EOF
userID = [Forms]![MainForm]![txtUserID]
AccountNumber = Me.Account_Number
problemNumber = [Forms]![RemovesForm]![problemNumber]
If (problemNumber = "") Then
problemNumber = "N/A"
End If
Set AccountsTable = CurrentDb.OpenRecordset("Accounts")
Do Until AccountsTable.EOF
If (AccountNumber = AccountsTable![AccountNumber]) Then
If (userID = AccountsTable![userID]) Then
GoTo Continue
End If
End If
AccountsTable.MoveNext
Loop
AccountsSubform.MoveNext
Loop
End With
Any help with this would be awesome!
I am having trouble setting the AccountsSubform recordset equal to what is entered into the form. This is what I have currently:
**all other declarations
Dim AccountsSubform As RecordSet
Me.SubscriptionRemovesSubform.Form.Refresh
Set AccountsSubform = Me.SubscriptionRemovesSubform.Form.RecordsetClone
With AccountsSubform
Do While Not AccountsSubform.EOF
userID = [Forms]![MainForm]![txtUserID]
AccountNumber = Me.Account_Number
problemNumber = [Forms]![RemovesForm]![problemNumber]
If (problemNumber = "") Then
problemNumber = "N/A"
End If
Set AccountsTable = CurrentDb.OpenRecordset("Accounts")
Do Until AccountsTable.EOF
If (AccountNumber = AccountsTable![AccountNumber]) Then
If (userID = AccountsTable![userID]) Then
GoTo Continue
End If
End If
AccountsTable.MoveNext
Loop
AccountsSubform.MoveNext
Loop
End With
Any help with this would be awesome!