Using MS Access/input data

Advertisement


Question
QUESTION: I have create text box on my access form. This text box allows users to input numeric data such as 20, 30, 40 etc. How do I use this input data to calculate mileage and display it on my form. So i want to display the result of "input data" * Rate  
I have a rate table.

ANSWER: If you are using a Rate table, how do you choose which rate to apply?

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

---------- FOLLOW-UP ----------

QUESTION: I am choosing rate based on the country name they choose from a drop-down list.

Answer
Ok, so I imagine the Rowsource of that Combobox looks something like this:

SELECT CountryID, Country, Rate
FROM tblRates;

If so, you add a text box to your form with a Controlsource of:

=[control1]*[cbocountry].column(2)

where control1 is the name of the control where you enter the numercial data and cbocountry the country combobox.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA  

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

©2012 About.com, a part of The New York Times Company. All rights reserved.