473,387 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Update All Rows on Continuous form Based on Selection in Footer

All,

I've got a continuous form with one field on it, with a comob
Mar 26 '08 #1
9 4670
Sorry about the auto-post. Don't know what keys I hit.

I have a continuous form with a combo box and a field on it, and a
combo box in the footer.
-----------
{body cbox} [field]
-----------
{body cbox} [field]
-----------
______
-----------
[footer cbox]
-----------

Let's say the combo box on the form is for the drinks I want...and I
can choose Martini, Gimlet, etc.

I can choose as many drinks as I want.

The combo box in the footer is my choice of liquor.

-----------
Gimlet [liquor]
-----------
Martini [liquor]
-----------
______
-----------
Gin
-----------

I only get to choose one type of liquor for any and all drinks. (Sad
example, but there you go. This is driving me to drink.)

Right now, the way my form behaves is when I change my type of liquor
in the footer, it only changes the type of liquor for the row I am
"on" in the body of the form. (I'm using an after update event in the
combo box in the footer:
Me.TB_Body = Me.CB_Footer.)

How can I get it to change the type of liquor for ALL rows in the body
of the form?

Thanks,

Patrick
Mar 26 '08 #2
On Mar 26, 5:35*pm, Patrick A <park...@stradley.comwrote:
Sorry about the auto-post. *Don't know what keys I hit.

I have a continuous form with a combo box and a field on it, and a
combo box in the footer.
-----------
{body cbox} * [field]
-----------
{body cbox} * [field]
-----------
______
-----------
[footer cbox]
-----------

Let's say the combo box on the form is for the drinks I want...and I
can choose Martini, Gimlet, etc.

I can choose as many drinks as I want.

The combo box in the footer is my choice of liquor.

-----------
Gimlet * [liquor]
-----------
Martini * [liquor]
-----------
______
-----------
Gin
-----------

I only get to choose one type of liquor for any and all drinks. *(Sad
example, but there you go. *This is driving me to drink.)

Right now, the way my form behaves is when I change my type of liquor
in the footer, it only changes the type of liquor for the row I am
"on" in the body of the form. *(I'm using an after update event in the
combo box in the footer:
Me.TB_Body = Me.CB_Footer.)

How can I get it to change the type of liquor for ALL rows in the body
of the form?

Thanks,

Patrick
Patrick

Just be careful not to drive after drinking.

You can use a loop to go through all the rows in the form. I haven't
done this so i don't know the exact commands (those inside #) for most
of this so here is my best.

for i = 1 to #recordcount#
Me.TB_Body = Me.CB_Footer.
DoCmd.GoToRecord acDataForm, "FormName", acGoTo, i
next i

I can't find how to get the number of record in the Form. Best why i
can think of is to have a text control that counts the total number of
fields Count(*). And using that. Perhaps somebody else has a better
solution. Most of the stuff i've found in the net, have a ton of
coding.

- GL
Mar 27 '08 #3
Guillermo,

Thanks for that

Hmmmm.

Any idea how I can get the name of the current subform, given that I
have 6 instances of it on my form, and the user could be in any of
them?

(When I use the Object Name of the form, Access tells me it's not
open.)
Thanks,

Patrick
Mar 27 '08 #4
"Patrick A" <pa*****@stradley.comwrote in message
news:2e**********************************@a1g2000h sb.googlegroups.com...
Guillermo,

Thanks for that

Hmmmm.

Any idea how I can get the name of the current subform, given that I
have 6 instances of it on my form, and the user could be in any of
them?

(When I use the Object Name of the form, Access tells me it's not
open.)
Thanks,

Patrick
Try:

Me.Parent.Name

That should give you the name of the subform control that is hosting your
form.
Mar 28 '08 #5
Stuart,

Thanks for your response.

me.Parent.name gives me the Object name (FRM_My_SubForm) of the parent
form.
me.name gives me the Object name of the parent form (FRM_My_Form) .

I need the "Instance" name of the form, e.g. Forms!FRM_Inst1!
SFRM_Inst1, or Forms!FRM_Inst1!SFRM_Inst2, etc.

Any suggestions?
Mar 28 '08 #6
"Patrick A" <pa*****@stradley.comwrote in message
news:ba**********************************@c65g2000 hsa.googlegroups.com...
Stuart,

Thanks for your response.

me.Parent.name gives me the Object name (FRM_My_SubForm) of the parent
form.
That sure sounds like the name of a subform control on the parent form
(which is the 'instance' name you mention). It certainly doesn't sound like
the name of the parent form. I think you need to take another look.
me.name gives me the Object name of the parent form (FRM_My_Form) .
No, if the code is running on the subform, it gives you the name of _that_
form.
>
I need the "Instance" name of the form, e.g. Forms!FRM_Inst1!
SFRM_Inst1, or Forms!FRM_Inst1!SFRM_Inst2, etc.

Any suggestions?

Mar 29 '08 #7
Sorry, I miss-typed. Still trying to figure this out.

Invoked in the AfterUpdate event of the control on the sub form,
me.parent.name gives me the Object name (FRM_My_Form) of the Parent form.
me.name gives me the Object name of the Child form (SFRM_My_SubForm) .
I need the "Instance" name of the form,
e.g. Forms!FRM_My_Form_Inst1!SFRM_My_SubForm_Inst1, or Forms!
FRM_My_Form_Inst1!SFRM_My_SubForm_Inst2, etc.

Thanks,

Patrick
Mar 31 '08 #8
"Patrick A" <pa*****@stradley.comwrote in message
news:7a**********************************@8g2000hs u.googlegroups.com...
Sorry, I miss-typed. Still trying to figure this out.

Invoked in the AfterUpdate event of the control on the sub form,
>me.parent.name gives me the Object name (FRM_My_Form) of the Parent form.
>me.name gives me the Object name of the Child form (SFRM_My_SubForm) .

I need the "Instance" name of the form,
e.g. Forms!FRM_My_Form_Inst1!SFRM_My_SubForm_Inst1, or Forms!
FRM_My_Form_Inst1!SFRM_My_SubForm_Inst2, etc.

Thanks,

Patrick
Ok, I've looked back through the thread and I'm not certain I have your
model correct in my mind. Let's review: As I understand it you have one main
form containing 6 subform controls, all of which contain the same form,
showing different data, presumably (else why do it).

Is that a correct summation?
Mar 31 '08 #9
On Mar 31, 3:02*pm, "Stuart McCall" <smcc...@myunrealbox.comwrote:

Stuart,
Ok, I've looked back through the thread and I'm not certain I have your
model correct in my mind. Let's review: As I understand it you have one main
form containing 6 subform controls, all of which contain the same form,
showing different data, presumably (else why do it).

Is that a correct summation?
Yes, that is correct.

While the Object name of the subform might be SFRM_Mine, the name I've
given it when I added it to the main form is what I'm after, e.g.
SFRM_Mine_Inst1, SFRM_Mine_Inst2, SFRM_Mine_Inst3, etc.

Thanks,

Patrick
Apr 1 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Greg Neef | last post by:
I need to develop a Tab Form where selecting a particular key from an unbound combo listbox will resulting in the display one or many records from several tables, where each tab has the matching...
2
by: aaj | last post by:
Hi all I have a continuous bound form and on each record is a tick box. The user ticks the boxes and these boxes define the batch. for future operations before they leave the page I count...
1
by: Andy Frank | last post by:
I have a tabular form that has a combo box on it that is reading from a database. When that combobox changes, I want it to lookup a database record to get a value and set the value into another...
1
by: Roger | last post by:
I've got a continuous form based on a query the first 2 controls on the form are bound to columns in the query a third control (paymentAmount) is unbound I have a total control in the footer,...
15
by: Paul T. Rong | last post by:
Hi everybody, This time a very very difficult case: I have a table "tblStudent", there are 50 students, I also made a form "frmStudent" based on "tblStudent", now if I don't want to show all...
6
by: balancetotal | last post by:
Creating a running sum in continuous form in Access 2003 -------------------------------------------------------------------------------- Hello: I have three forms on my user-interface. ...
0
by: tdes42 | last post by:
Hi :) I have been banging away at this patchwork piece of code for some time... I'm trying to create a button that will disable after it is successfully used to add records to table1, but on a...
0
by: Patrick A | last post by:
All, I've got a continuous form with one field on it, with a comob
2
by: troy_lee | last post by:
I have a subform being displayed as a continuous form. One of the fields for each record is a combo box with two options- removal or installation. How do I color all the fields for the row based...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.