Trying to insert a new record into a dynaset from a query
which is the basis for the main form.
Tried update query
as well as event procedure
and not sure where to look to remedy. This is for a combo box. The underlying tables previously had no restrictions before and the structure was a client table had a lookup to a city table and a residence table, so I added the tblzip_tblresidence table for the constraints, which I'm thinking might be the issue. Currently error messages are "item is not in list" and "cannot append, the db is not open". Seeing as I had 200 split access applications dumped on a newb, I'm looking for any and all suggestions.
Code:
SELECT TblClient.[ClientID], TblClient.CreateBy, TblClient.CreateDate, tblZip.City, tblResidence.Residence, tblEthnicity.Ethnicity, TblClient.ClientCode, TblClient.ModDate, TblClient.ModBy,TblClient.Language_Primary,
FROM (tblZip INNER JOIN (tblEthnicity INNER JOIN (TblClient INNER JOIN tblEpisodes ON TblClient.[ClientID] = tblEpisodes.ClientID) ON tblEthnicity.EthnicityID = TblClient.Ethnicity) ON (tblZip.CityID = TblClient.City) AND (tblZip.CityID = TblClient.City)) INNER JOIN (tblResidence INNER JOIN tblzip_tblresidence ON tblResidence.ResId = tblzip_tblresidence.Resid) ON tblZip.CityID = tblzip_tblresidence.cityid;
Tried update query
Code:
INSERT INTO TblClient ( ClientID )
VALUES (FORMS!frmClient!Combo109);
as well as event procedure
Code:
Private Sub Command129_Click()
On Error GoTo Err_Command129_Click
Dim currentRS As DAO.Recordset
Set currentRS = Currentdb.OpenRecordset("qryFrmClient")
currentRS.AddNew
currentRS!ClientID = Str(Me![Combo109])
currentRS.Update
'DoCmd.GoToRecord , , acNewRec
[Combo109] = Null
[Box440].[BackStyle] = 0
[Box155].[BackStyle] = 0
[frmEpisodes].[Form].[Visible] = True
ClientCode.Visible = True
Under16.Visible = True
Exit_Command129_Click:
Exit Sub
Err_Command129_Click:
MsgBox Err.Description
Resume Exit_Command129_Click
End Sub
and not sure where to look to remedy. This is for a combo box. The underlying tables previously had no restrictions before and the structure was a client table had a lookup to a city table and a residence table, so I added the tblzip_tblresidence table for the constraints, which I'm thinking might be the issue. Currently error messages are "item is not in list" and "cannot append, the db is not open". Seeing as I had 200 split access applications dumped on a newb, I'm looking for any and all suggestions.