Full Version: Looking Up Tables To Fill In Information On Forms
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
chinookcrew
I have a form that has two fields with information that the user inputs into text boxes. I also have a table that these two text boxes correspond with. how do I make it where when the user enters in the correct information the form will automatically input the corrseponding information from the table into a seperate text box? I've included a screen shot of the form. The information that will be filled out by the user is the height and circumference fields and the information I want to automatically fill in is the Body Fat % field. I've tried the lookup feature but the downside to this is there are a total of 42 columns in this table and i'm limited to 20.
KimbleG
Hi,
I would be inclined to do this using VBA code or a query, however, the problem might be the 2 input parameter fields, being imprecise.
What I mean here is if the user inputs 5' 9 1/2" as a height and a circumference of 42" (I assume waistline) iconfused.gif ,and if you don't have anything in your lookup table that satisfies these parameters, then you are going to need to search for the closest Body Fat % fit.

Please attach the DB to this forum and I'm sure we can give you some pointers.

Kimbo
chinookcrew
The file is too big to post on here. But using the screen shot, the user inputs the three measurements for the neck and three for the abdomen and I have the form setup where it averages those three numbers and inputs the data into the average field. Then we have to subtract the neck average from the abdomen average and thats when the form automatically does this calculation and inserts it into the Circumference field. The height field is a drop down box that corresponds to the coulmn headings on the table and all cicumference measurements are rounded to the nearest .5 or whole number which also corresponds with the circumference coulmn in the table. What I would like to happen is when they click on the Body Fat % text box it automatically fills in the corresponding number that is in the table. Ive thought about building a macro for it when I started it i couldn't figure out how to do that either. I'm racking my brain with this so any help would be greatly appreciated.







QUOTE (KimbleG @ Apr 1 2010, 01:43 PM) *
Hi,
I would be inclined to do this using VBA code or a query, however, the problem might be the 2 input parameter fields, being imprecise.
What I mean here is if the user inputs 5' 9 1/2" as a height and a circumference of 42" (I assume waistline) iconfused.gif ,and if you don't have anything in your lookup table that satisfies these parameters, then you are going to need to search for the closest Body Fat % fit.

Please attach the DB to this forum and I'm sure we can give you some pointers.

Kimbo

RAZMaddaz
Kimbo,

There are many ways to make your file/database small enough for you to upload the file. For example, create a NEW File/database and then import ONLY the table(s), Queries and Forms that are being to used to create your current Form. Then Zip the file and upload the file. BUT, make sure NONE OF THE DATA IN YOUR DATABASE CONTAINS ANY PRIVATE INFORMATION before you attach the file.

Hope this helps!!!!

RAZMaddaz
chinookcrew
Its telling me that this type of file is not permitted


QUOTE (RAZMaddaz @ Apr 2 2010, 07:26 AM) *
Kimbo,

There are many ways to make your file/database small enough for you to upload the file. For example, create a NEW File/database and then import ONLY the table(s), Queries and Forms that are being to used to create your current Form. Then Zip the file and upload the file. BUT, make sure NONE OF THE DATA IN YOUR DATABASE CONTAINS ANY PRIVATE INFORMATION before you attach the file.

Hope this helps!!!!

RAZMaddaz

Bob_L
QUOTE (chinookcrew @ Apr 2 2010, 09:18 AM) *
Its telling me that this type of file is not permitted

You need to ZIP the file first.
chinookcrew
Sorry about that. I got it this time.


QUOTE (boblarson @ Apr 2 2010, 11:19 AM) *
You need to ZIP the file first.

KimbleG
Hi,
Sorry for taking so long to get back to you - I've been away for Easter boating - no internet laugh.gif
Attached is your solution.
Of note is the difficulty you have created for yourself with the pivot table of data, making it very difficult to use a query on.
However, I've provided your solution with a bit of VBA code in the AfterUpdate event of Height and circumference.

Click to view attachment

HTH.

Kimbo
chinookcrew
Thanks so much for the help, I'm new to access and I never would have figured this out.


QUOTE (KimbleG @ Apr 5 2010, 12:52 AM) *
Hi,
Sorry for taking so long to get back to you - I've been away for Easter boating - no internet laugh.gif
Attached is your solution.
Of note is the difficulty you have created for yourself with the pivot table of data, making it very difficult to use a query on.
However, I've provided your solution with a bit of VBA code in the AfterUpdate event of Height and circumference.

Click to view attachment

HTH.

Kimbo

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.