Select Object in sub forms

S

steve walker

MS Access 2000, Windows XP
I have created a form from a query which seraches for a member of a club and
created my main form. I have then created two other queries.
Rental query and Video query
I have created forms for both and added the Rental form (frmsubRental) to
the main form (member) as a sub form. I have then added the video form
(frmInStock) as a subform to the rental form.
A macro contains the following
GoToControl [InStock]

Set Value Item [Forms]![frmMember]![frmsubRental]![frmInStock]![InStock]
Expresion [Forms]![frmMember]![frmsubRental]![frmInStock]![InStock]=0

GoToRecord New

This updates the InStock field and will give me a new record, the problem is
that I want to move to the frmsubRental form to go to a new record but I get
an error of form not open with either SelectObject or the GoToControl
action.

If anyone could give me a guide would be very appreciated. Tried lots of
combinations but not sure on how to do this.

Cheers

Steve W


--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
 
K

Ken Snell [MVP]

I'm not clear about what you're doing, but in order to move the focus to a
subform on a main form, it takes two consecutive GoToControl actions. The
first sets the focus on the subform control (the control that holds the
subform). The second then sets focus on the control in the subform. You must
do this in two steps.

Action: GoToControl
Control Name: TheNameOfTheSubformControl

Action: GoToControl
Control Name:
TheNameOfTheSubformControl!TheNameOfTheControlInTheSubform
 
S

steve walker

Thanks Ken not used the control action to select the field will have a go
Steve W.

--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com


Ken Snell said:
I'm not clear about what you're doing, but in order to move the focus to a
subform on a main form, it takes two consecutive GoToControl actions. The
first sets the focus on the subform control (the control that holds the
subform). The second then sets focus on the control in the subform. You
must do this in two steps.

Action: GoToControl
Control Name: TheNameOfTheSubformControl

Action: GoToControl
Control Name:
TheNameOfTheSubformControl!TheNameOfTheControlInTheSubform

--

Ken Snell
<MS ACCESS MVP>

steve walker said:
MS Access 2000, Windows XP
I have created a form from a query which seraches for a member of a club
and created my main form. I have then created two other queries.
Rental query and Video query
I have created forms for both and added the Rental form (frmsubRental) to
the main form (member) as a sub form. I have then added the video form
(frmInStock) as a subform to the rental form.
A macro contains the following
GoToControl [InStock]

Set Value Item [Forms]![frmMember]![frmsubRental]![frmInStock]![InStock]
Expresion [Forms]![frmMember]![frmsubRental]![frmInStock]![InStock]=0

GoToRecord New

This updates the InStock field and will give me a new record, the problem
is that I want to move to the frmsubRental form to go to a new record but
I get an error of form not open with either SelectObject or the
GoToControl action.

If anyone could give me a guide would be very appreciated. Tried lots of
combinations but not sure on how to do this.

Cheers

Steve W


--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top