MajP
You've got your good things, and you've got mine.
- Local time
- Yesterday, 20:18
- Joined
- May 21, 2018
- Messages
- 9,990
I would have to try, but the fact that this happens at all has is happening behind the scenes. I am thinking maybe not because something has to trigger this, almost like a wizard.Would opening the form in design view in code and reassigning the record source have the same effect as when doing it manually? Just curious...
Imagine a completely blank form (no controls) with no recordsource. Then you add a recordsource and now all the fields are properties of the form. All you did was put a string in the recordsource property. Something then had to key access to then read all the fields and build these as properties. With a control that is created when you drop the control on a form.
If you ever worked in vb.net you can see how this is done behind the scenes. Because you can actually see the code that builds the form in the form designer. This is not what we call the form module, but the thing that builds the form. In Access this is not visible, but probably exists in some hidden format. Normally you never touch this
So if I create a cmbobox on the form this code is created behind the scenes in the form designer
Code:
'cmboN
'
Me.cmboN.DisplayMember = "2"
Me.cmboN.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmboN.FormattingEnabled = True
Me.cmboN.Items.AddRange(New Object() {"2", "3", "4", "5", "6", "7", "8", "9", "10"})
Me.cmboN.Location = New System.Drawing.Point(171, 614)
Me.cmboN.Name = "cmboN"
Me.cmboN.Size = New System.Drawing.Size(40, 21)
Me.cmboN.TabIndex = 11
Something is similarly happening in Acces. I am guessing some code is being written in a hidden designer. Not sure if setting this in code will do it, but maybe.