Manipulating a control source

G

Guest

Access 2000. I have a form with boxes showing quantities for exmaple
Type of Lolipop Quantity
Green 1
red 3
blue 5
Then I have another box (call it total cost) in which the control source
reads:
green*1.50+red*1.00+blue*.50 (its basically taking the quantity amount,
multiply by a fix price, adding it all together and then showing the dollar
amount in the total cost)
Which I'm ok with. But if the want to change the resulting dollar amount I
cannot click on the total cost box and change it. I want to do that from time
to time. How can I do that? Thanks in advance.
 
G

Guest

Move your formula to the Default Value property. Then you will be able to
change the value in the text box.

Also, you need to include Yellow Lolipop's.
 
G

Guest

Oh I thought it was going to be more complicated then that! I tried it and it
seem to work fine. Thanks

Next time I will make sure to include the yellow, orange and purple lolipops
making it a rainbow collection.
 
G

Guest

Ok, I guess my problem didn't go away. Now the problem is that if I have more
then 5 clients and each of them wanted different quantities of lolipops, the
total amount is the same for every client. For example:

Mrs. Lolipop bought: 1,500 green lolipops
So in the total amount box (since default value property reads:
green*1.50+red*1.00+blue*.50) it should have a total of $2,250 but I want to
give her a discount on the cost so I change the amount to $1,900

well when I go to my next client Mr. Lolipop who only bought 2 green
lolipops, his total amount box shows $1,900 when it should only be $3.00!

Am I missing something? Help :(
 
G

Guest

Not really, I just think we are lost in a dark alley. If you can post some
more info, we can make it happen.
Is the form bound or unbound?
Is this form only for putting in new orders or do you pull the data back up
to view or make changes to it?
Am I to understand there is a text box for each color?
I am going home now, so I will look at your response tomorrow.
 
G

Guest

Okay...hope that this makes sense...
The form is bound to a table which contains field names like: client name,
phone, green, red, blue, total cost, date order, date shipped (there is more
fields in the actual table that I am working on but I am trying to make this
very simple). A tab control was created with the toolbox with 3 tabs, so...
Tab 1 has text boxes: Client name, phone, and so on
Tab 2 has text boxes: green, red, blue, and so on
Tab 3 has text boxes: total cost, date order, date shipped, and so on
On the total cost control source (before
posting my ?) I had the following: =Iff([date order>0,
[green]*1.5+[red]*1+[blue]*.50)
which always gave me the result that I wanted. But in some scenerios like
the one I describe before with my client Mrs. Lolipop I want to have the
ability to go to the total cost box, in form view, and change the dollar
amount. Which I am not able to do with the above set up but I want to be able
to. see my frustration.

Once the date shipped is enter, I only have to pull the data back up to view
and once in a blue moon I might need to make changes to the record. But after
a year I append all the completed orders to another table and leave the
uncompleted orders in place.

Hope you had a good night rest because I am probably going to be pulling my
hair for the rest of the day. :)
 
G

Guest

Okay, good info. My only problem is that I have not worked with Tabs for a
long time, so I don't remember for sure what events are available. If there
is a Current event for a Tab, I would try putting the same formula you have
for the default value of the Total cost there. If that is not the right
place, then you need to find an event that happens after you have put in all
the colors but before you move to the Totals Tab. It may take some
experimentation to get it to behave like you want, because if a user goes
back from the Totals Tab to the Colors Tab and makes a change there, the
change would have to be reflected on the Totals Tab.

I hope this will help. Thanks, I did get a good nights sleep. If you pull
out your hair, then you will look like me. :)

coronacity said:
Okay...hope that this makes sense...
The form is bound to a table which contains field names like: client name,
phone, green, red, blue, total cost, date order, date shipped (there is more
fields in the actual table that I am working on but I am trying to make this
very simple). A tab control was created with the toolbox with 3 tabs, so...
Tab 1 has text boxes: Client name, phone, and so on
Tab 2 has text boxes: green, red, blue, and so on
Tab 3 has text boxes: total cost, date order, date shipped, and so on
On the total cost control source (before
posting my ?) I had the following: =Iff([date order>0,
[green]*1.5+[red]*1+[blue]*.50)
which always gave me the result that I wanted. But in some scenerios like
the one I describe before with my client Mrs. Lolipop I want to have the
ability to go to the total cost box, in form view, and change the dollar
amount. Which I am not able to do with the above set up but I want to be able
to. see my frustration.

Once the date shipped is enter, I only have to pull the data back up to view
and once in a blue moon I might need to make changes to the record. But after
a year I append all the completed orders to another table and leave the
uncompleted orders in place.

Hope you had a good night rest because I am probably going to be pulling my
hair for the rest of the day. :)


Klatuu said:
Not really, I just think we are lost in a dark alley. If you can post some
more info, we can make it happen.
Is the form bound or unbound?
Is this form only for putting in new orders or do you pull the data back up
to view or make changes to it?
Am I to understand there is a text box for each color?
I am going home now, so I will look at your response tomorrow.
 
G

Guest

Okay well there is no Current Event for the tab, there is only: On Click, Dlb
Click, mouse up, down, move. I would need to have that ability too, were a
user will sometimes go back and change the quantity of the color and then
have it reflect on the total box. well I guess I have two choices experiment
somemore or just leave it like it is.

No worries, I have lots of hair.

Klatuu said:
Okay, good info. My only problem is that I have not worked with Tabs for a
long time, so I don't remember for sure what events are available. If there
is a Current event for a Tab, I would try putting the same formula you have
for the default value of the Total cost there. If that is not the right
place, then you need to find an event that happens after you have put in all
the colors but before you move to the Totals Tab. It may take some
experimentation to get it to behave like you want, because if a user goes
back from the Totals Tab to the Colors Tab and makes a change there, the
change would have to be reflected on the Totals Tab.

I hope this will help. Thanks, I did get a good nights sleep. If you pull
out your hair, then you will look like me. :)

coronacity said:
Okay...hope that this makes sense...
The form is bound to a table which contains field names like: client name,
phone, green, red, blue, total cost, date order, date shipped (there is more
fields in the actual table that I am working on but I am trying to make this
very simple). A tab control was created with the toolbox with 3 tabs, so...
Tab 1 has text boxes: Client name, phone, and so on
Tab 2 has text boxes: green, red, blue, and so on
Tab 3 has text boxes: total cost, date order, date shipped, and so on
On the total cost control source (before
posting my ?) I had the following: =Iff([date order>0,
[green]*1.5+[red]*1+[blue]*.50)
which always gave me the result that I wanted. But in some scenerios like
the one I describe before with my client Mrs. Lolipop I want to have the
ability to go to the total cost box, in form view, and change the dollar
amount. Which I am not able to do with the above set up but I want to be able
to. see my frustration.

Once the date shipped is enter, I only have to pull the data back up to view
and once in a blue moon I might need to make changes to the record. But after
a year I append all the completed orders to another table and leave the
uncompleted orders in place.

Hope you had a good night rest because I am probably going to be pulling my
hair for the rest of the day. :)


Klatuu said:
Not really, I just think we are lost in a dark alley. If you can post some
more info, we can make it happen.
Is the form bound or unbound?
Is this form only for putting in new orders or do you pull the data back up
to view or make changes to it?
Am I to understand there is a text box for each color?
I am going home now, so I will look at your response tomorrow.

:

Nope. Its a single form. Did I hit a dead end?

:

Is this a continuous form? This doesn't seem right.
:

Ok, I guess my problem didn't go away. Now the problem is that if I have more
then 5 clients and each of them wanted different quantities of lolipops, the
total amount is the same for every client. For example:

Mrs. Lolipop bought: 1,500 green lolipops
So in the total amount box (since default value property reads:
green*1.50+red*1.00+blue*.50) it should have a total of $2,250 but I want to
give her a discount on the cost so I change the amount to $1,900

well when I go to my next client Mr. Lolipop who only bought 2 green
lolipops, his total amount box shows $1,900 when it should only be $3.00!

Am I missing something? Help :(



:

If Lolipop.Color = "Purple" Then
Docmd.Quit
End If

:

Oh I thought it was going to be more complicated then that! I tried it and it
seem to work fine. Thanks

Next time I will make sure to include the yellow, orange and purple lolipops
making it a rainbow collection.

:

Move your formula to the Default Value property. Then you will be able to
change the value in the text box.

Also, you need to include Yellow Lolipop's.

:

Access 2000. I have a form with boxes showing quantities for exmaple
Type of Lolipop Quantity
Green 1
red 3
blue 5
Then I have another box (call it total cost) in which the control source
reads:
green*1.50+red*1.00+blue*.50 (its basically taking the quantity amount,
multiply by a fix price, adding it all together and then showing the dollar
amount in the total cost)
Which I'm ok with. But if the want to change the resulting dollar amount I
cannot click on the total cost box and change it. I want to do that from time
to time. How can I do that? Thanks in advance.
 
G

Guest

Try the Click event of the totals tab. You have to click it to get to it, so
that should update the total. But, what if you have manually overridden it?
(can i borrow some hair?)

coronacity said:
Okay well there is no Current Event for the tab, there is only: On Click, Dlb
Click, mouse up, down, move. I would need to have that ability too, were a
user will sometimes go back and change the quantity of the color and then
have it reflect on the total box. well I guess I have two choices experiment
somemore or just leave it like it is.

No worries, I have lots of hair.

Klatuu said:
Okay, good info. My only problem is that I have not worked with Tabs for a
long time, so I don't remember for sure what events are available. If there
is a Current event for a Tab, I would try putting the same formula you have
for the default value of the Total cost there. If that is not the right
place, then you need to find an event that happens after you have put in all
the colors but before you move to the Totals Tab. It may take some
experimentation to get it to behave like you want, because if a user goes
back from the Totals Tab to the Colors Tab and makes a change there, the
change would have to be reflected on the Totals Tab.

I hope this will help. Thanks, I did get a good nights sleep. If you pull
out your hair, then you will look like me. :)

coronacity said:
Okay...hope that this makes sense...
The form is bound to a table which contains field names like: client name,
phone, green, red, blue, total cost, date order, date shipped (there is more
fields in the actual table that I am working on but I am trying to make this
very simple). A tab control was created with the toolbox with 3 tabs, so...
Tab 1 has text boxes: Client name, phone, and so on
Tab 2 has text boxes: green, red, blue, and so on
Tab 3 has text boxes: total cost, date order, date shipped, and so on
On the total cost control source (before
posting my ?) I had the following: =Iff([date order>0,
[green]*1.5+[red]*1+[blue]*.50)
which always gave me the result that I wanted. But in some scenerios like
the one I describe before with my client Mrs. Lolipop I want to have the
ability to go to the total cost box, in form view, and change the dollar
amount. Which I am not able to do with the above set up but I want to be able
to. see my frustration.

Once the date shipped is enter, I only have to pull the data back up to view
and once in a blue moon I might need to make changes to the record. But after
a year I append all the completed orders to another table and leave the
uncompleted orders in place.

Hope you had a good night rest because I am probably going to be pulling my
hair for the rest of the day. :)


:

Not really, I just think we are lost in a dark alley. If you can post some
more info, we can make it happen.
Is the form bound or unbound?
Is this form only for putting in new orders or do you pull the data back up
to view or make changes to it?
Am I to understand there is a text box for each color?
I am going home now, so I will look at your response tomorrow.

:

Nope. Its a single form. Did I hit a dead end?

:

Is this a continuous form? This doesn't seem right.
:

Ok, I guess my problem didn't go away. Now the problem is that if I have more
then 5 clients and each of them wanted different quantities of lolipops, the
total amount is the same for every client. For example:

Mrs. Lolipop bought: 1,500 green lolipops
So in the total amount box (since default value property reads:
green*1.50+red*1.00+blue*.50) it should have a total of $2,250 but I want to
give her a discount on the cost so I change the amount to $1,900

well when I go to my next client Mr. Lolipop who only bought 2 green
lolipops, his total amount box shows $1,900 when it should only be $3.00!

Am I missing something? Help :(



:

If Lolipop.Color = "Purple" Then
Docmd.Quit
End If

:

Oh I thought it was going to be more complicated then that! I tried it and it
seem to work fine. Thanks

Next time I will make sure to include the yellow, orange and purple lolipops
making it a rainbow collection.

:

Move your formula to the Default Value property. Then you will be able to
change the value in the text box.

Also, you need to include Yellow Lolipop's.

:

Access 2000. I have a form with boxes showing quantities for exmaple
Type of Lolipop Quantity
Green 1
red 3
blue 5
Then I have another box (call it total cost) in which the control source
reads:
green*1.50+red*1.00+blue*.50 (its basically taking the quantity amount,
multiply by a fix price, adding it all together and then showing the dollar
amount in the total cost)
Which I'm ok with. But if the want to change the resulting dollar amount I
cannot click on the total cost box and change it. I want to do that from time
to time. How can I do that? Thanks in advance.
 

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