[Solved] Error linking subform query to main form
Posted: Fri Mar 05, 2021 7:29 pm
Hello,
I begin by saying I am a rank newbie with any kind of database program, I'm trying to learn by doing.
I had stability issues with my database, and it finally crashed hard and would not recover. So I switched to using Villeroy's suggested Split macro to begin from scratch. Now I am having an issue where my query for a subform won't load. The query runs as expected on its own, when I link it to the main form, all the other fields load except the formatted text box for the query result.
The error message reads:
“The data content could not be loaded.”
“user lacks privilge or object not found: FactoredTimeID” ← the qquery's field that links to Mainform subform.
When I select MORE to track down the error there are two Errors and an Information on the list:
Error #1 : “The data content could not be loaded.”
Error #2:
SQL Status: 42501
Error code:-5501
user lacks privilege or object not found: FactoredTimeID
Information:
The SQL command leading to this error is:
SELECT "Recipes"."RecipeID" AS "FactoredTimeID", ( "Recipes"."RecipeHours" + ( "Recipes"."RecipeMins" / 60.00 ) ) * ( 1.00 - "Ports"."LaborFactor" / 100.00 ) AS "FactoredTime" FROM "Recipes", "Ports" WHERE ( "Recipes"."RecipePortID" = "Ports"."PortID" ) AND ( ( "FactoredTimeID" = :link_from_RecipeID ) )
This appears to be the auto-generated SQL that is the result of popup that I used from link fields in the Data tab link fields wizard popup. It is the same code that I wrote to create the query but with the added “AND ( ( "FactoredTimeID" = :link_from_RecipeID ) ).
Any thoughts on why this isn't working? If it is a privilege thing where do I fix that? Or why can't it find the object?
Thank for any insights that can be provided.
I begin by saying I am a rank newbie with any kind of database program, I'm trying to learn by doing.
I had stability issues with my database, and it finally crashed hard and would not recover. So I switched to using Villeroy's suggested Split macro to begin from scratch. Now I am having an issue where my query for a subform won't load. The query runs as expected on its own, when I link it to the main form, all the other fields load except the formatted text box for the query result.
The error message reads:
“The data content could not be loaded.”
“user lacks privilge or object not found: FactoredTimeID” ← the qquery's field that links to Mainform subform.
When I select MORE to track down the error there are two Errors and an Information on the list:
Error #1 : “The data content could not be loaded.”
Error #2:
SQL Status: 42501
Error code:-5501
user lacks privilege or object not found: FactoredTimeID
Information:
The SQL command leading to this error is:
SELECT "Recipes"."RecipeID" AS "FactoredTimeID", ( "Recipes"."RecipeHours" + ( "Recipes"."RecipeMins" / 60.00 ) ) * ( 1.00 - "Ports"."LaborFactor" / 100.00 ) AS "FactoredTime" FROM "Recipes", "Ports" WHERE ( "Recipes"."RecipePortID" = "Ports"."PortID" ) AND ( ( "FactoredTimeID" = :link_from_RecipeID ) )
This appears to be the auto-generated SQL that is the result of popup that I used from link fields in the Data tab link fields wizard popup. It is the same code that I wrote to create the query but with the added “AND ( ( "FactoredTimeID" = :link_from_RecipeID ) ).
Any thoughts on why this isn't working? If it is a privilege thing where do I fix that? Or why can't it find the object?
Thank for any insights that can be provided.