Subform problem

  • Thread starter Thread starter Raj
  • Start date Start date
R

Raj

I have used the Upsize Wizard to move my Access Tables to
SQL Server 7.0. My main form contains a subform that is
used to list all items associate with the current record,
does display data that is already entered but it will not
let me add new items or change the current data. Can
someone tell me how I can correct this.
Thanks in advance
 
Does the subform's underlying table have a primary key defined and is that
primary key part of the subform's recordset?

--Brian
 
Brian,
The subform does not have a primary key. I do have an
autonumber assiged to it should I make this the primary
key?
 
I ran into a similar issues using sub-forms. One work-around I had found is this:

In the sub-form properties I removed any relationship in the parent/child fields. Yep, remove em.

Then I changed the query in the sub-form itself to use the parameters property (ie: select field(s) from table where field = ?). Then in the parameters you would link it to your parent forms field you are using as the primary-key (ie fileID int=[forms]![myParentForm]![fileID]). Remember in the parameter property the name of the parameter matters more to you, the data type needs to be specified followed by "=" and after that point to the form's field that you want to use.

--Micah
Brian,
The subform does not have a primary key. I do have an
autonumber assiged to it should I make this the primary
key?
 
Back
Top