Hi There,
I am trying to create a very simple append query that takes the primary ID's from each table (tblName, tblOffices and tblMailbox) and adds them to the tblBreakdown dependent on the selected data in the three comboboxes (cboName, cboOffice and cboMailbox) on frmMailboxAssignment.
What should happen is I select a name an office and a mailbox type via the comboboxes and then press on btnAssign. This should run my qryAppendBreakdown which will take the associated ID's of the name, office and mailbox type and stick it in the tblBreakdown (see attachment for table).
Now what is happening is nothing. It doesn't select any ID's and doesn't input anything into the tblBreakdown.
My code is as follows:
And my query is as pictured (see attachment).
I would appreciate any help you can give me please.
Many thanks,
Dom
I am trying to create a very simple append query that takes the primary ID's from each table (tblName, tblOffices and tblMailbox) and adds them to the tblBreakdown dependent on the selected data in the three comboboxes (cboName, cboOffice and cboMailbox) on frmMailboxAssignment.
What should happen is I select a name an office and a mailbox type via the comboboxes and then press on btnAssign. This should run my qryAppendBreakdown which will take the associated ID's of the name, office and mailbox type and stick it in the tblBreakdown (see attachment for table).
Now what is happening is nothing. It doesn't select any ID's and doesn't input anything into the tblBreakdown.
My code is as follows:
Code:
Private Sub btnAssign_Click()
On Error GoTo btnAssign_Click_Err
DoCmd.OpenQuery "qryAppendBreakdown", acViewNormal, acAdd
btnAssign_Click_Exit:
Exit Sub
btnAssign_Click_Err:
MsgBox Error$
Resume btnAssign_Click_Exit
End Sub
And my query is as pictured (see attachment).
I would appreciate any help you can give me please.
Many thanks,
Dom