Main form's record source:
The subform is a datasheet meant to view and possibly enter new records in the table Pagamenti.
subform's record source (from the afterupdate of a cbo in the main form):
Now I selected that the Master field "Clienti_Ricette.IDCliente" be linked to the child field "IDCliente", so that when a new record is added, that field is automatically populated. For some reason, though, it stays blank. How can I fix this?
Code:
SELECT Clienti_Ricette.*, Pagamenti.* FROM Clienti_Ricette, Pagamenti
The subform is a datasheet meant to view and possibly enter new records in the table Pagamenti.
subform's record source (from the afterupdate of a cbo in the main form):
Code:
mysql = "SELECT Pagamenti.* FROM Pagamenti " & _
"WHERE Pagamenti.IDCliente = " & Me.cboRicetteEsistenti.Column(0) & ";"
Me.frmPagamentiSub.Form.RecordSource = mysql
Me.frmPagamentiSub.Form.Visible = True
Now I selected that the Master field "Clienti_Ricette.IDCliente" be linked to the child field "IDCliente", so that when a new record is added, that field is automatically populated. For some reason, though, it stays blank. How can I fix this?