UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Looking Up Tables To Fill In Information On Forms    
 
   
chinookcrew
post Apr 1 2010, 11:22 AM
Post #1

UtterAccess Member
Posts: 35



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.
Attached File(s)
Attached File  Calculator.jpg ( 52.82K ) Number of downloads: 23
 
Go to the top of the page
 
+
KimbleG
post Apr 1 2010, 01:43 PM
Post #2

UtterAccess Guru
Posts: 652
From: Auckland, New Zealand



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) (IMG:style_emoticons/default/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
Go to the top of the page
 
+
chinookcrew
post Apr 2 2010, 07:17 AM
Post #3

UtterAccess Member
Posts: 35



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) (IMG:style_emoticons/default/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

Go to the top of the page
 
+
RAZMaddaz
post Apr 2 2010, 07:26 AM
Post #4

UtterAccess VIP
Posts: 6,171
From: Bethesda, MD USA



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
Go to the top of the page
 
+
chinookcrew
post Apr 2 2010, 11:18 AM
Post #5

UtterAccess Member
Posts: 35



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

Go to the top of the page
 
+
Bob_L
post Apr 2 2010, 11:19 AM
Post #6

Utterly Banned
Posts: 7,038



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.
Go to the top of the page
 
+
chinookcrew
post Apr 2 2010, 11:27 AM
Post #7

UtterAccess Member
Posts: 35



Sorry about that. I got it this time.


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


Attached File(s)
Attached File  utteraccess.zip ( 30.42K ) Number of downloads: 6
 
Go to the top of the page
 
+
KimbleG
post Apr 5 2010, 12:52 AM
Post #8

UtterAccess Guru
Posts: 652
From: Auckland, New Zealand



Hi,
Sorry for taking so long to get back to you - I've been away for Easter boating - no internet (IMG:style_emoticons/default/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.

Attached File  utteraccess.zip ( 41.31K ) Number of downloads: 5


HTH.

Kimbo
Go to the top of the page
 
+
chinookcrew
post Apr 5 2010, 08:45 AM
Post #9

UtterAccess Member
Posts: 35



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 (IMG:style_emoticons/default/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.

Attached File  utteraccess.zip ( 41.31K ) Number of downloads: 5


HTH.

Kimbo

Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 11:55 PM