50229

Expression in control source and default value

Question:

I am pulling my hair here. I want to link 2 subform fields to a field in the main form. I used Parent.MyFieldName.Column(3) for the control source of the first subform field and it is displayed fine. The Row source of my second subform field is using the first subform field as a criteria for its query. The problem is that this combobox remains empty when I use the above code but is populated if I give the first field a constant value. Feels like the combobox is getting filled before the retrieval of data from the first subform field. I tried moving the above code form control source to default value but then both fields remain empty.

What am I doing wrong?

Answer1:

I have found the main reason why things weren't working - Subform controls load before the rest of the main form. This means that at the time my subform dropdown menu seeks the data in the other form fields they still haven't appeared and thus I am left with an empty dropdown menu.

I solved this by removing the sourceobject of the subform control and adding

Me!Subform1.SourceObject = "SubformOtpuskaneIzhMat"

In some events in the main form.

Recommend

  • how to sort the field in the mongo document which is inside array
  • Swift: Validate Username Input
  • Nhibernate QueryOver Orderby
  • Why do empty folders disappear when adding Visual Studio solution to TFS?
  • how to migrate existing records to match new ORM in rails
  • Add a TCombobox Column to a Firemonkey TGrid
  • Oracle: Using CTE with update clause
  • Set comboBox to custom display format
  • Avoiding dependencies is exploding the number of projects in my VS solution
  • JS object key sequence
  • How to control Trigger state (Pause, Play) using code (not just buttons)
  • How to write string.Contains(someText) in expression Tree
  • What do I do with this error when I run tests in rails?
  • How to replace TouchesBegan with UIGestureRecognizer
  • Return to second to last URL in MVC (return View with previous filter conditions applied)?
  • How do you remove the JComboBox 'click and see dropdown' functionality?
  • NUnit 3.0 TestCase const custom object arguments
  • How to remove a SwiftyJSON element?
  • How can I set a binding to a Combox in a UserControl?
  • Time complexity of a program which involves multiple variables
  • Can you perform a UNION without a subquery in SQLAlchemy?
  • PostgreSQL Query without WHERE only ORDER BY and LIMIT doesn't use index
  • Linq Objects Group By & Sum
  • Optimizing database types to compact database (SQLite)
  • Sony Xperia Z Tablet not found by adb
  • How to recover from a Spring Social ExpiredAuthorizationException
  • Join two tables and save into third-sql
  • How to model a transition system with SPIN
  • Display Images one by one with next and previous functionality
  • ORA-29908: missing primary invocation for ancillary operator
  • How can I estimate amount of memory left with calling System.gc()?
  • Unanticipated behavior
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • Buffer size for converting unsigned long to string
  • SQL merge duplicate rows and join values that are different
  • Hits per day in Google Big Query
  • Can't mass-assign protected attributes when import data from csv file
  • reshape alternating columns in less time and using less memory
  • Unable to use reactive element in my shiny app
  • Converting MP3 duration time