Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new row creation in subform not available

Status
Not open for further replies.

cdck

Programmer
Nov 25, 2003
281
US
A form which controls information about vendors includes a subform to allow multiple notes regarding the same vendor. The main form pulls from the Vendors table, the subform pulls from the VendorScope table. The two forms are linked based on the vendor number, which is text, 6 in length, in both tables; it is the primary key in the Vendor table.

The VendorScope table includes a primary key which is a numeric field set to generate a numeric id with a seed of 1.

Both tables are stored in SQL Server.

I am able to open the VendorScope table directly from the tables section of the database window and add new records in the normal manner. When the Vendor form is opened, the subform pulls associated records correctly and shows them. However, there is no way to add a new row to a vendor on the subform; if there is no record already, no rows at all show up, and either way, the new record button is greyed out.

I have run into this issue before, but cannot remember what the solution is. I have opened other forms on which I have sucessfully integrated subforms that allow data entry, and cannot see the difference between those forms and this one. I apologize for asking this question, which seems very elementary, but I would really appreciate help.

Cheryl dc Kern
 
I discovered the issue. The subform called the vendor number and primary key in the record source query, but did not display them. I added fields for these two items and then set them to not be visible, and the form now functions correctly.

Cheryl dc Kern
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top