By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,812 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,812 IT Pros & Developers. It's quick & easy.

SubForm control is disabled when new record commenced on main form

P: n/a
MLH
When the vehicle entry form (frmVehicleEntryForm) first opens, the
additional owner SubForm control (frmAddnlOwnrListSubForm) is
enabled. You can click on it and it will accept the focus. But after
you enter data to the first field on the main form (a VIN#), that is
not the case. The SubForm control becomes disabled and will not
accept the focus. Dunno why. There's no child/master link fields.
They have no settings - at least not in design view. If I run this

?forms!frmVehicleEntryForm!frmAddnlOwnrListSubForm .LinkChildFields

in the immediate window when the form is open, I don't get any
output. Main form is bound to a table. Subform control is based on
a form that is bound to a query (qryAddnlOwnrList) which has only
a single table in it.

Any idea(s) why the SubForm may freeze up after commencing
entry of a new vehicle record in the main form?
Mar 18 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
When you say "There's no child/master link fields.", do you mean the
LinkMasterFields and LinkChildFields are both Null, or that there is no data
in those fields? If the properties list a Field, and either of the Fields is
Null, then it makes perfect sense to me that the Subform would be
inaccesible.

I generally use Subforms in the way they were intended, to show values from
Tables related to the Table whose values are displayed in the main Form, and
don't have any difficulty. When I try to be clever and use them some other
way, to get around a stumbling block, I find they often do not work the way
I'd hoped and cause me more trouble than the problem I'd expected to solve
by using them.

Larry Linson
Microsoft Access MVP
"MLH" <CR**@NorthState.net> wrote in message
news:m9********************************@4ax.com...
When the vehicle entry form (frmVehicleEntryForm) first opens, the
additional owner SubForm control (frmAddnlOwnrListSubForm) is
enabled. You can click on it and it will accept the focus. But after
you enter data to the first field on the main form (a VIN#), that is
not the case. The SubForm control becomes disabled and will not
accept the focus. Dunno why. There's no child/master link fields.
They have no settings - at least not in design view. If I run this

?forms!frmVehicleEntryForm!frmAddnlOwnrListSubForm .LinkChildFields

in the immediate window when the form is open, I don't get any
output. Main form is bound to a table. Subform control is based on
a form that is bound to a query (qryAddnlOwnrList) which has only
a single table in it.

Any idea(s) why the SubForm may freeze up after commencing
entry of a new vehicle record in the main form?

Mar 18 '06 #2

P: n/a
MLH
On Sat, 18 Mar 2006 19:31:23 GMT, "Larry Linson"
<bo*****@localhost.not> wrote:
When you say "There's no child/master link fields.", do you mean the
LinkMasterFields and LinkChildFields are both Null, or that there is no data
in those fields? If the properties list a Field, and either of the Fields is
Null, then it makes perfect sense to me that the Subform would be
inaccesible.

Oops. That wasn't clear, was it? What I should have said was that both
the LinkMasterFields and LinkChildFields properties of the SubForm
control were Null. I'm using the control basically pretty much like a
list box.
Mar 20 '06 #3

P: n/a
MLH
<snip>
If the properties list a Field, and either of the Fields is
Null, then it makes perfect sense to me that the Subform would be
inaccesible.

Hmmm. Am I completely stumped? I need access to the control.
That's for sure. Perhaps if I understood why it worked that way.
Oh well...
Mar 21 '06 #4

P: n/a

"MLH" <CR**@NorthState.net> wrote in message
news:t2********************************@4ax.com...
On Sat, 18 Mar 2006 19:31:23 GMT, "Larry Linson"
<bo*****@localhost.not> wrote:
When you say "There's no child/master link fields.", do you mean the
LinkMasterFields and LinkChildFields are both Null, or that there is no
data
in those fields? If the properties list a Field, and either of the Fields
is
Null, then it makes perfect sense to me that the Subform would be
inaccesible.

Oops. That wasn't clear, was it? What I should have said was that both
the LinkMasterFields and LinkChildFields properties of the SubForm
control were Null. I'm using the control basically pretty much like a
list box.


If both of those Properties are Null, e.g., neither of them specifies a
Field, then I don't know what is going on. I will see if I can re-create a
similar situation in Access 2002.

Is there any "linkage" between the Vehicle and the records from
AddlOwnrList? Do you recreate the qryAddnlOwnrList with some criteria? Does
it have some criteria, or are you just using it to pick a record?

What are you trying to accomplish with the Subform that you could not
accomplish with a Combo or List Box?

Larry Linson
Microsoft Access MVP
Mar 22 '06 #5

P: n/a
MLH
>
If both of those Properties are Null, e.g., neither of them specifies a
Field, then I don't know what is going on. I will see if I can re-create a
similar situation in Access 2002. Good, because if this will work, it will be act like a control I have
not yet seen in A97.
Is there any "linkage" between the Vehicle and the records from
AddlOwnrList? Yes there is. the vehicles table (tblVehicleJobs) has a keyfield
[VehicleJobID] - autonumber type. The table on which qryAddnlOwnrList
is based (tblAddnlOwners) has a long integer type field of the same
name and the two tables are linked in a one-to-many relationship.
So, the title for a given vehicle can have 1 primary owner (tblOwners)
and many additional owners.
Do you recreate the qryAddnlOwnrList with some criteria? Does
it have some criteria, or are you just using it to pick a record? qryAddnlOwnrList merely alphabetizes records in tblAddnlOwnrs.
All records in tblAddnlOwnrs are reflected in the dynaset.

What are you trying to accomplish with the Subform that you could not
accomplish with a Combo or List Box? Now there's the question. And my final answer is...
The cool thing that I want to do here is for the subform to act like a
listbox that allows you to choose more than 1 record at once. The
mechanism for it is quite simple - a subform control listing a bunch
of additional owner names/addresses with a checkbox control at
the beginning of each row. The checkbox is simply a Yes/No field
in tblAddnlOwnrs. I wipe that field's data occasionally to make sure
its clean prior to each instance where I wish to give user the ability
to indicate and choose additional owners of a given vehicle. After
he has done so, I quickly scan tblAddnlOwnrs for records where
this Yes/No field is Yes and I set their [VehicleJobID] field values
to that of the current vehicle job ID. Of course, this is followed by
another quick wipe of the Yes/No values. Values in that field only
live for a very short time. It is my wish that each time the app is
launched - the Yes/No field be clear of data.

The objective in a nutshell is to have something that, although
it may have the appearance of a list box, is not a listbox at all.
Instead of allowing you to scroll through and select a single record
(a listbox allows selection of only one record-at-a-time) - it allows
you to 'select' multiple records at a time. Of course, you are not
'selecting' records at all. You are merely setting a field value in
each record as you go. But it gives one the appearance of being
able to select multiple records in a listbox and that's what I was
trying to do.
Larry Linson
Microsoft Access MVP


Mar 23 '06 #6

P: n/a
MLH
<snip>
Is there any "linkage" between the Vehicle and the records from
AddlOwnrList? Do you recreate the qryAddnlOwnrList with some criteria? Does
it have some criteria, or are you just using it to pick a record?

I also wanted to mention that I tried deleting the defined relationshp
and it had no effect. Still, when I type the very first keystroke into
the vehicle entry form (commencing the entry of a new record into
tblVehicleJobs) the subform control becomes unselectable at that
instant. If the user makes his/her 'selections' in the subform control
FIRST - all is well. Mission accomplished. But the natural tendency
is to enter the VIN first and then rock on. Of course, the user is
disappointed (after having completed a dozen fields) when he realizes
he must press the ESC key and lose everything entered into the record
at that point, just so he can choose the additional owners in the sub-
form control.

<snip>
Mar 23 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.