A
Alain
Hi,
I have a problem and I just do not know how to solve it,
I have a command button that need to open a client form so the end user can
enter or modify the information regarding that client.The reason for using a
separate form is I lack space on my main form so by removing all lables and
making textfields transparent, I use 50% less sapce for showing the
information, once I close the client form I refresh the main and all the
info shows, it is work good
My problem is when I enter a new client using the client form (pop up and
modal), I cannot save the information at all because a related record is
required in the table property,
My table property is the one I use to populate info on my main form:
SELECT tblProperty.IdProperty, tblProperty.IdType, tblProperty.ReferenceNo,
tblCompany.CieName, tblCompany.CieAddress
FROM tblProperty LEFT JOIN tblCompany ON tblProperty.IdProperty =
tblCompany.IdProperty;
( short version here since I have a lot more fields)
My client form use this query:
SELECT tblCompany.*
FROM tblCompany;
The command button code :
Private Sub cmdCompany_Click()
On Error GoTo Err_cmdCompany_Click
'ouverture du formulaire frmCompany
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCompany"
stLinkCriteria = "[IdProperty]=" & Me![IdProperty]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdCompany_Click:
Me.cmbBusinessGroup.SetFocus
Exit Sub
Err_cmdCompany_Click:
MsgBox Err.Description
Resume Exit_cmdCompany_Click
End Sub
On my closing button on my client form I have a command line to save the
recordset but not doing his job
My table relationships seem to be fine I have a one-to-many relation from my
property table to my client table which is OK
Can anyone help me here to understand my problem I just ran out of
ideas....
Thanks
Alain
I have a problem and I just do not know how to solve it,
I have a command button that need to open a client form so the end user can
enter or modify the information regarding that client.The reason for using a
separate form is I lack space on my main form so by removing all lables and
making textfields transparent, I use 50% less sapce for showing the
information, once I close the client form I refresh the main and all the
info shows, it is work good
My problem is when I enter a new client using the client form (pop up and
modal), I cannot save the information at all because a related record is
required in the table property,
My table property is the one I use to populate info on my main form:
SELECT tblProperty.IdProperty, tblProperty.IdType, tblProperty.ReferenceNo,
tblCompany.CieName, tblCompany.CieAddress
FROM tblProperty LEFT JOIN tblCompany ON tblProperty.IdProperty =
tblCompany.IdProperty;
( short version here since I have a lot more fields)
My client form use this query:
SELECT tblCompany.*
FROM tblCompany;
The command button code :
Private Sub cmdCompany_Click()
On Error GoTo Err_cmdCompany_Click
'ouverture du formulaire frmCompany
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCompany"
stLinkCriteria = "[IdProperty]=" & Me![IdProperty]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdCompany_Click:
Me.cmbBusinessGroup.SetFocus
Exit Sub
Err_cmdCompany_Click:
MsgBox Err.Description
Resume Exit_cmdCompany_Click
End Sub
On my closing button on my client form I have a command line to save the
recordset but not doing his job
My table relationships seem to be fine I have a one-to-many relation from my
property table to my client table which is OK
Can anyone help me here to understand my problem I just ran out of
ideas....
Thanks
Alain