Vba subform recordsource not updating


Principally In the Chield Field /s we enter information from the main form that concerns the subform!The relation is: the first field from Link Master Fields corresponds to the first field from Link Chield Fields! I have another issue that i want one field in the subform to be a combo box when one of the value selected, rest of the fields should be changed to match the selected value. Not sure if this is what you are looking for, but here is what I did for a similar situation.It has the following fields: Part ID - Autonumber (PK) ref Part - Text ref Cost - Currency tbl TBMParts Cost is the child table that stores all the parts used for each customer. It has the following fields: TBMID - Number (PK) Part ID - Number (PK) - Same as Part ID in tblref Parts List Part Name - Text - Same as ref Part in tblref Parts List Part Cost - Currency My subform is based on tbl TBMParts Costs. It has the following Before Update event procedure: Private Sub Cost_Before Update(Cancel As Integer) Me. I know the problem is with the auto increment field that is not updating, any way to do it ?? In function of the link the query may be updatable or not! In the properties you have to flook for Link master field and link chield field properties!Take care what kind of link are you doing and which table you will edit, append or update with your select query! What I understood is that I need a select query to get my records and another update query and another append query to do both actions. Those properties do the connection between Main and subform!



When I try to add new record and filling table fields It showing me an error : The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. You have to transform your query in updatable by using table / or linked tables that can be updated! Thanks in Advanced In fact the only thing that I said is that: YOU NEED TO USE AN UPDATABLE SELECT QUERY FOR YOUR SUBFORM /S IF it isn't the case so you have to think how to do your queries updatable! The subform which is located in the form also has properties that you can see them clicking in the respective subform once pressing the right mouse bouton if you are with right handing mouse and choose properties! It is a very strange solution to a very unusual problem. In order to see the Properties sheet that has the above 2 fields, bring up the property sheet of the subform. Click the Data tab, and you'll see the following: I have the same issue. The string is the least memory intensive variable that will hold a sourceobject(a variant will do as well, but will use more memory). In order to see the Properties sheet that has the above 2 fields, bring up the property sheet of the subform. Click the Data tab, and you'll see the following: in the Properties sheet.Please note these are both cascading Combo boxes, and the Child Name combo box has the ID hidden in it.

In the back end the tables are linked by the child ID, this is the primary key in the Studentlist table and a foreign key in the Points table.

I have written VBA code that filters the SQL statements of the subforms based upon the value of the the REV field on the main form.