If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
subform issue
Is there a reason why a subform won't let you enter new data? I can enter new
data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#2
|
|||
|
|||
subform issue
Check your subform's AllowAdditions property. Did it get set to False somehow?
"Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#3
|
|||
|
|||
subform issue
"Allow Additions" says yes, although "Data Entry" says no. I'll try changing
that one. thanks! "Brian" wrote: Check your subform's AllowAdditions property. Did it get set to False somehow? "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#4
|
|||
|
|||
subform issue
nope....that didn't fix it. I did notice, though, that I have an error
message on the status bar that says "join key of table Order Details not in record set" when I try to add a new record. I don't have any idea where to go to fix it! "Patttt" wrote: "Allow Additions" says yes, although "Data Entry" says no. I'll try changing that one. thanks! "Brian" wrote: Check your subform's AllowAdditions property. Did it get set to False somehow? "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#5
|
|||
|
|||
subform issue
Question: Are you working with the subform while in the main form? Or did you
open the subform separately to work with it? I'm not an expert at this, but I tried creating some forms with subforms recently. If you go to http://www.allenbrowne.com/casu-22.html you can find an excellent source regarding all of this by MVP Crystal Long. I printed the whole thing and made a book to refer to later. Anyway, there's asection on working with subforms and it really helped. The best way I could find to deal with the subform was to edit it directly rather than through the main form. I hope this helps, Garrett "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#6
|
|||
|
|||
subform issue
you need to go back and look at the tables/relationships. what table is
bound to the mainform? what is that table's primary key field? what table is bound to the subform? does that table contain a foreign key field that links back to the primary key field of the first table? if yes, is that foreign key field included in the RecordSource of the subform? is the primary key field of the first table included in the RecordSource of the mainform? hth "Patttt" wrote in message ... nope....that didn't fix it. I did notice, though, that I have an error message on the status bar that says "join key of table Order Details not in record set" when I try to add a new record. I don't have any idea where to go to fix it! "Patttt" wrote: "Allow Additions" says yes, although "Data Entry" says no. I'll try changing that one. thanks! "Brian" wrote: Check your subform's AllowAdditions property. Did it get set to False somehow? "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#7
|
|||
|
|||
subform issue
The subform is based on a query that does contain my data when I open the
query. It's based on 2 tables that have primary key/ foreign key relationships. The query contains a field called "product id" that is the primary key one of the tables. However, an early designer added some code that replaces the product id number with the name of the product (another table that is also related). I had it working once in the subform, but it only displayed the product id code - not the product name. Now, I don't have any entries in the subform at all. To answer your questions: 1. the mainform is bound to the Orders table 2. Order Id is the primary key of Orders 3. The subform is bound to a query based on Orders and Order Details tables. the tables are related on the Order ID field. 4. Order ID from Order is part of the query (not displayed in the subform). Order ID is part of the main form and displayed on the main form. Thanks so much for your help! For some reason, the query DOES display the records, but the subform doesn't AND we can't add anything new via the query or the subform. Pat "tina" wrote: you need to go back and look at the tables/relationships. what table is bound to the mainform? what is that table's primary key field? what table is bound to the subform? does that table contain a foreign key field that links back to the primary key field of the first table? if yes, is that foreign key field included in the RecordSource of the subform? is the primary key field of the first table included in the RecordSource of the mainform? hth "Patttt" wrote in message ... nope....that didn't fix it. I did notice, though, that I have an error message on the status bar that says "join key of table Order Details not in record set" when I try to add a new record. I don't have any idea where to go to fix it! "Patttt" wrote: "Allow Additions" says yes, although "Data Entry" says no. I'll try changing that one. thanks! "Brian" wrote: Check your subform's AllowAdditions property. Did it get set to False somehow? "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#8
|
|||
|
|||
subform issue
well, in the subform, i'd get rid of the two-table query. bind the subform
to tblOrderDetails, or to a query that includes only tblOrderDetails. make sure the subform is linked to the mainform, by setting the LinkChildFields property to OrderID (which refers to the OrderID foreign key field in tblOrderDetails) and setting the LinkMasterFields property to OrderID (which refers to the OrderID primary key field in tblOrders). if you want to see/choose products by name, in the OrderDetails subform, then add a combobox control in the subform, with the ControlSource set to the ProductID field in tblOrderDetails, and the RowSource set to a SQL statement based on tblProducts, something like SELECT ProductID, ProductName FROM tblProducts ORDER BY ProductName; set the combobox control's BoundColumn to 1 (the default), the ColumnCount to 2, and the ColumnWidths to 0";2" so the ProductID will be correctly stored in the ProductID field in tblOrderDetails, but the combobox control in the subform with *display* the product name, not the id. hth "Patttt" wrote in message ... The subform is based on a query that does contain my data when I open the query. It's based on 2 tables that have primary key/ foreign key relationships. The query contains a field called "product id" that is the primary key one of the tables. However, an early designer added some code that replaces the product id number with the name of the product (another table that is also related). I had it working once in the subform, but it only displayed the product id code - not the product name. Now, I don't have any entries in the subform at all. To answer your questions: 1. the mainform is bound to the Orders table 2. Order Id is the primary key of Orders 3. The subform is bound to a query based on Orders and Order Details tables. the tables are related on the Order ID field. 4. Order ID from Order is part of the query (not displayed in the subform). Order ID is part of the main form and displayed on the main form. Thanks so much for your help! For some reason, the query DOES display the records, but the subform doesn't AND we can't add anything new via the query or the subform. Pat "tina" wrote: you need to go back and look at the tables/relationships. what table is bound to the mainform? what is that table's primary key field? what table is bound to the subform? does that table contain a foreign key field that links back to the primary key field of the first table? if yes, is that foreign key field included in the RecordSource of the subform? is the primary key field of the first table included in the RecordSource of the mainform? hth "Patttt" wrote in message ... nope....that didn't fix it. I did notice, though, that I have an error message on the status bar that says "join key of table Order Details not in record set" when I try to add a new record. I don't have any idea where to go to fix it! "Patttt" wrote: "Allow Additions" says yes, although "Data Entry" says no. I'll try changing that one. thanks! "Brian" wrote: Check your subform's AllowAdditions property. Did it get set to False somehow? "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#9
|
|||
|
|||
subform issue
Hi Tina,
I just wanted to let you know that your expertise was a terrific help! I fixed the problem - everything is running smoothly. You're the best! Pat "tina" wrote: well, in the subform, i'd get rid of the two-table query. bind the subform to tblOrderDetails, or to a query that includes only tblOrderDetails. make sure the subform is linked to the mainform, by setting the LinkChildFields property to OrderID (which refers to the OrderID foreign key field in tblOrderDetails) and setting the LinkMasterFields property to OrderID (which refers to the OrderID primary key field in tblOrders). if you want to see/choose products by name, in the OrderDetails subform, then add a combobox control in the subform, with the ControlSource set to the ProductID field in tblOrderDetails, and the RowSource set to a SQL statement based on tblProducts, something like SELECT ProductID, ProductName FROM tblProducts ORDER BY ProductName; set the combobox control's BoundColumn to 1 (the default), the ColumnCount to 2, and the ColumnWidths to 0";2" so the ProductID will be correctly stored in the ProductID field in tblOrderDetails, but the combobox control in the subform with *display* the product name, not the id. hth "Patttt" wrote in message ... The subform is based on a query that does contain my data when I open the query. It's based on 2 tables that have primary key/ foreign key relationships. The query contains a field called "product id" that is the primary key one of the tables. However, an early designer added some code that replaces the product id number with the name of the product (another table that is also related). I had it working once in the subform, but it only displayed the product id code - not the product name. Now, I don't have any entries in the subform at all. To answer your questions: 1. the mainform is bound to the Orders table 2. Order Id is the primary key of Orders 3. The subform is bound to a query based on Orders and Order Details tables. the tables are related on the Order ID field. 4. Order ID from Order is part of the query (not displayed in the subform). Order ID is part of the main form and displayed on the main form. Thanks so much for your help! For some reason, the query DOES display the records, but the subform doesn't AND we can't add anything new via the query or the subform. Pat "tina" wrote: you need to go back and look at the tables/relationships. what table is bound to the mainform? what is that table's primary key field? what table is bound to the subform? does that table contain a foreign key field that links back to the primary key field of the first table? if yes, is that foreign key field included in the RecordSource of the subform? is the primary key field of the first table included in the RecordSource of the mainform? hth "Patttt" wrote in message ... nope....that didn't fix it. I did notice, though, that I have an error message on the status bar that says "join key of table Order Details not in record set" when I try to add a new record. I don't have any idea where to go to fix it! "Patttt" wrote: "Allow Additions" says yes, although "Data Entry" says no. I'll try changing that one. thanks! "Brian" wrote: Check your subform's AllowAdditions property. Did it get set to False somehow? "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
#10
|
|||
|
|||
subform issue
you're welcome, glad it worked for you!
"Patttt" wrote in message news Hi Tina, I just wanted to let you know that your expertise was a terrific help! I fixed the problem - everything is running smoothly. You're the best! Pat "tina" wrote: well, in the subform, i'd get rid of the two-table query. bind the subform to tblOrderDetails, or to a query that includes only tblOrderDetails. make sure the subform is linked to the mainform, by setting the LinkChildFields property to OrderID (which refers to the OrderID foreign key field in tblOrderDetails) and setting the LinkMasterFields property to OrderID (which refers to the OrderID primary key field in tblOrders). if you want to see/choose products by name, in the OrderDetails subform, then add a combobox control in the subform, with the ControlSource set to the ProductID field in tblOrderDetails, and the RowSource set to a SQL statement based on tblProducts, something like SELECT ProductID, ProductName FROM tblProducts ORDER BY ProductName; set the combobox control's BoundColumn to 1 (the default), the ColumnCount to 2, and the ColumnWidths to 0";2" so the ProductID will be correctly stored in the ProductID field in tblOrderDetails, but the combobox control in the subform with *display* the product name, not the id. hth "Patttt" wrote in message ... The subform is based on a query that does contain my data when I open the query. It's based on 2 tables that have primary key/ foreign key relationships. The query contains a field called "product id" that is the primary key one of the tables. However, an early designer added some code that replaces the product id number with the name of the product (another table that is also related). I had it working once in the subform, but it only displayed the product id code - not the product name. Now, I don't have any entries in the subform at all. To answer your questions: 1. the mainform is bound to the Orders table 2. Order Id is the primary key of Orders 3. The subform is bound to a query based on Orders and Order Details tables. the tables are related on the Order ID field. 4. Order ID from Order is part of the query (not displayed in the subform). Order ID is part of the main form and displayed on the main form. Thanks so much for your help! For some reason, the query DOES display the records, but the subform doesn't AND we can't add anything new via the query or the subform. Pat "tina" wrote: you need to go back and look at the tables/relationships. what table is bound to the mainform? what is that table's primary key field? what table is bound to the subform? does that table contain a foreign key field that links back to the primary key field of the first table? if yes, is that foreign key field included in the RecordSource of the subform? is the primary key field of the first table included in the RecordSource of the mainform? hth "Patttt" wrote in message ... nope....that didn't fix it. I did notice, though, that I have an error message on the status bar that says "join key of table Order Details not in record set" when I try to add a new record. I don't have any idea where to go to fix it! "Patttt" wrote: "Allow Additions" says yes, although "Data Entry" says no. I'll try changing that one. thanks! "Brian" wrote: Check your subform's AllowAdditions property. Did it get set to False somehow? "Patttt" wrote: Is there a reason why a subform won't let you enter new data? I can enter new data in the main form section just fine. The subform does have the dropdown list that displays the correct choices, but when I click on one of them, nothing is entered in the field. Essentially, the subform only displays the existing data but won't let you enter new records. The tables ARE related, so it's not a relationship issue. any thoughts? Thanks for your help! Pat |
|
Thread Tools | |
Display Modes | |
|
|