Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8895177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:42:26+00:00 2026-06-14T23:42:26+00:00

I have three products, Corn and Beans and radishes. I have different specifications on

  • 0

I have three products, Corn and Beans and radishes. I have different specifications on each, and some the same… moisture, color, protein, fat…. I have some unbound textboxes and some labels in a continuous form. There are also two buttons that allow me sort by dates entered in two textboxes or show all. I have labels and textboxes in the formheader and textboxes in the detail section. The textboxes in the form header section are getting averages of each field they line up with.

When I open form and select Beans, everything shows up perfectly! I can sort or show all and it is fine. I can switch to Corn and do the same, but when I try to switch back to Beans, the Average textboxes display #Error. If I open the form and go to Corn first, then Beans and back to Corn, Corn works both times, but beans does not work. Beans will only work if it is the first thing opened on the form, and will continue to work until you select another product. Corn and radishes will work no matter what, but when I switch back to Beans, I get the #Error again.

There is virtually no difference between the two code blocks. What else could be causing the #Error in the Avg textboxes (Text12-Text15)?

Here is part of the code…. this code is in the OnClick Event for their respective buttons

For CORN

Me.Label2.Caption = "Moisture"
Me.Label3.Caption = "Starch"
Me.Label4.Caption = "Protein"
Me.Label5.Caption = "Fat"
Me.Text2.ControlSource = " Moisture "
Me.Text3.ControlSource = " Starch "
Me.Text4.ControlSource = " Protein "
Me.Text5.ControlSource = " Fat "
Me.Text12.ControlSource = "=Avg([Moisture])"
Me.Text13.ControlSource = "=Avg([Starch])"
Me.Text14.ControlSource = "=Avg([Protein])"
Me.Text15.ControlSource = "=Avg([Fat])"
Me.RecordSource = "SELECT SampleID.DateCreated, SampleID.SampleLocationID, PertenData.Moisture, PertenData.Starch, PertenData.Protein, PertenData.Fat FROM SampleID INNER JOIN PertenData ON SampleID.SampleID = PertenData.PertenSampleID WHERE ((SampleID.SampleLocationID)=21) ORDER BY SampleID.DateCreated DESC"

For BEANS

Me.Label2.Caption = "Moisture"
Me.Label3.Caption = "Starch"
Me.Label4.Caption = "Protein"
Me.Label5.Caption = "Color"
Me.Text2.ControlSource = " Moisture "
Me.Text3.ControlSource = " Starch "
Me.Text4.ControlSource = " Protein "
Me.Text5.ControlSource = " Color"
Me.Text12.ControlSource = "=Avg([Moisture])"
Me.Text13.ControlSource = "=Avg([Starch])"
Me.Text14.ControlSource = "=Avg([Protein])"
Me.Text15.ControlSource = "=Avg([Color])"
Me.RecordSource = "SELECT SampleID.DateCreated, SampleID.SampleLocationID, PertenData.Moisture, PertenData.Starch, PertenData.Protein, PertenData.Color FROM SampleID INNER JOIN PertenData ON SampleID.SampleID = PertenData.PertenSampleID WHERE ((SampleID.SampleLocationID)=35) ORDER BY SampleID.DateCreated DESC"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:42:27+00:00Added an answer on June 14, 2026 at 11:42 pm

    The problem was directly related to bound textboxes. My different samples had differing numbers of data categories that needed to be shown, but by setting the visible property of a textbox to false was still causing problems in the visible textboxes. To set a textbox back to ‘unbound’ I used

    Me.text5.ControlSource = Empty
    

    After changing the textboxes back to an unbound state and then rebind them to your new control source. This has permanently stopped the problem. I have now 5 products and any combination of those 5 works flawlessly. Thanks to all for your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Building an inventory system. I have lots of products and each product has three
My problem is that I have three different stock sizes for each product that
I have three tables products, sales and costs. The sales and products table each
Suppose I have a list of three products (A, B C). Each Product has
I have three types of products - Retail products (ID,product_categoryId,price,name) - Courses (ID,course_categoryId,price,name,roomId) -
There are some products for which I would like to have a special checkout
I have this three tables: products TABLE: id:integer name:string features TABLE: id:integer name:string features_products
I have three tables, Customers, Sales and Products. Sales links a CustomerID with a
I have three tables, products , shops , and sex . I wish to
I have three tables: `brands` (`id`, `name`) `categories` (`id`, `name`) `products` (`id`, `name`, `brand_id`,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.