Storing Values

G

Guest

I have a form that I am filling out listing each person in our company, their
cell phone numers, misc and than I have a combo box that I get to choose a
rate plan (it's being pulled from a table of available rate plans).

Once I select the rate plan - I set it up in the control source of the next
text box labelled "cost" with =RatePlan.Column(1) so that the cost is
automatically put in once the rate plan is selected. However, my problem is
that the value of the rate plan is not getting stored in the table (which I
am using in other forms).

Any ideas of what I'm doing wrong?
Thank you in advance for your help :)
 
J

Joan Wild

You shouldn't store the value of the rate plan in that table (that is
redundant).

Just create queries to pull the information when you need it i.e. a query
that uses your employee table and the rate plan table, linked on the
RatePlanID.

You can then include the rate plan value in your query.
 
G

Guest

Joan,
Thanks for the information.
I made a query with both the Tbl_names and Tbl_rate plans. Only showing the
persons name and rate plan, that's it.
Now when I enter the monthly bill I select the persons name from a combo box
going to this query and I want the rate plan to go into the text box - now
the =name.Column(2) is not working. It shows #Name?
Any ideas of where I went wrong? I need to show the rate plan so that I can
enter taxes, misc and have the total match what I'm getting billed.
Thank you very much for your time!
 
J

Joan Wild

That should be =name.Column(1) I believe. Also you shouldn't use a field
name of 'name' as that is a reserved word.

Again, I still don't see why you are trying to store this value a second
time. If you just want to see it on the form, you can change the rowsource
property of your combo so that it shows both columns...

SELECT PersonName & " - " & Rate as Expr1, PersonID FROM .....

then have column 2 be the bound column; set column widths to
1.5";0"
 
G

Guest

Joan,
Thank you for your help and time! I need to show the second value (rate
plan) with the persons name so that I can see the total. Here's what I'm
trying to do..
Select name (Tbl_Names) and when I select the name I want the rate plan that
the person has to store in a text box so that I can do the math. For example:
Select Bob Smith - the rate plan of 54.99 goes in a box. Than I can hand
enter the taxes, and any other charges that I have gotten billed for.
Than, (the purpose of the rate plan getting stored) the form will add the
rate plan (54.99) and any other charges that I got billed and give me a total
at the bottom and I can make sure that their total matches what I have
without running a report.
The only other way I figured out how to do this and it seems a little
repitious is to make two combo boxes. One for selecting the name and storing
the name and the other for selecting the name and storing the rate plan
value.
Am I totally off on what I'm thinking???
 
J

Joan Wild

Sounds to me that what you really want to store is the final total.

You can go back to your original idea of having a separate textbox bound to
your rate plan. In the after update of the combobox you can set the value
of the textbox...
Me!textbox = Me!combobox.Column(1)
 
G

Guest

Joan,
I got it to show the rate plan value and calculate the total :)
Thank you VERY much for your time, I really appreciate it!
Have a great day !!
 

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