user enters the variable that will be from another tables field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, First let me thank you for the help ahead of time. I am a self
taught access database maker.
My database that I am rebuilding because a change happened in a regulation
I built it in excell first then transferred it to database so a user can get
the information at a later time.
The problem comes from the fact the the fields in excell have 72.5. U
can't use period in a field name, So I figured that if I make the field and
times the original by 10 (i.e. 725) I eliminate the period. Now comes the
problem. How can I get the form to pick the variable out that the user puts
in. I also have a table of Height &weight, and a table of general
information(i.e. name, id number). The user picks the form male or female
and puts the pertinent stuff in but how can I get the form to show the 725
entry (8 percent body fat) I tried a query and that does not seem to work.
If I put more then two tables/query on the query it will not let me add
records to the database, so I am at a loss. I know a little about vb and I
am thinking that is the answer but i am not sure. Can someone point me in
the right direction please? Way thanks ahead of time! A truely lost person.
 
Hi Ipsalateral,

Congrats on teaching yourself Access and using it for a database instead of
Excel.

Can I suggest if you are rewriting your database you rename your fields to
something meaningful (unless of course in your application 725 is a clear and
meaningful description of what that field is).

Now, the reason you can't add data when you have more than one table in your
query is that you need to have relationships defined for those tables so
Access knows how to handle them. Look up Access help for a description of
how to put your relationships into your database.

Lastly, to get data out of another table you could either link the table in
a combo box, list box or similar, or use something like dlookup to look the
data up, eg:
dlookup("FIELDNAME", "TABLENAME", "[IDFIELD] = " & me.FORMTEXTBOX)

Hope this helps.

Damian.
 
Thanks Damian,
That is the problem. The one field is circumference (difference from
waist and neck) and the other is height. So since I could only make one
field that is easy to remember I picked circumference. the other fields are
690 695 (for 69 inches and 69 and half.
So the vba would be something like this? in the control
dlookup("heightm", "male table", "[circumference] = " & me.FORMTEXTBOX)
thanks I'll try it.
Ipsalateral



Damian S said:
Hi Ipsalateral,

Congrats on teaching yourself Access and using it for a database instead of
Excel.

Can I suggest if you are rewriting your database you rename your fields to
something meaningful (unless of course in your application 725 is a clear and
meaningful description of what that field is).

Now, the reason you can't add data when you have more than one table in your
query is that you need to have relationships defined for those tables so
Access knows how to handle them. Look up Access help for a description of
how to put your relationships into your database.

Lastly, to get data out of another table you could either link the table in
a combo box, list box or similar, or use something like dlookup to look the
data up, eg:
dlookup("FIELDNAME", "TABLENAME", "[IDFIELD] = " & me.FORMTEXTBOX)

Hope this helps.

Damian.

Ipsalateral said:
Hello, First let me thank you for the help ahead of time. I am a self
taught access database maker.
My database that I am rebuilding because a change happened in a regulation
I built it in excell first then transferred it to database so a user can get
the information at a later time.
The problem comes from the fact the the fields in excell have 72.5. U
can't use period in a field name, So I figured that if I make the field and
times the original by 10 (i.e. 725) I eliminate the period. Now comes the
problem. How can I get the form to pick the variable out that the user puts
in. I also have a table of Height &weight, and a table of general
information(i.e. name, id number). The user picks the form male or female
and puts the pertinent stuff in but how can I get the form to show the 725
entry (8 percent body fat) I tried a query and that does not seem to work.
If I put more then two tables/query on the query it will not let me add
records to the database, so I am at a loss. I know a little about vb and I
am thinking that is the answer but i am not sure. Can someone point me in
the right direction please? Way thanks ahead of time! A truely lost person.
 
Hello,
Here is what I tried an still I'm at a loss I tried basing a query on a
query. I tried the Dlook up but I must be in lala land cause i get errors.
I tried to do a macro and that does not seem to work. Can I referr the data
to the spread sheet in excell if the spread sheet does not move?
sorry to be a pain.

I need to reference the other table that has circumference and column (that
is the issue) 670, 675 etc. The height I times by ten to get awy from the
periods. and that is the column names any ideas or help would be great
appreciated
thanks again


Ipsalateral said:
Thanks Damian,
That is the problem. The one field is circumference (difference from
waist and neck) and the other is height. So since I could only make one
field that is easy to remember I picked circumference. the other fields are
690 695 (for 69 inches and 69 and half.
So the vba would be something like this? in the control
dlookup("heightm", "male table", "[circumference] = " & me.FORMTEXTBOX)
thanks I'll try it.
Ipsalateral



Damian S said:
Hi Ipsalateral,

Congrats on teaching yourself Access and using it for a database instead of
Excel.

Can I suggest if you are rewriting your database you rename your fields to
something meaningful (unless of course in your application 725 is a clear and
meaningful description of what that field is).

Now, the reason you can't add data when you have more than one table in your
query is that you need to have relationships defined for those tables so
Access knows how to handle them. Look up Access help for a description of
how to put your relationships into your database.

Lastly, to get data out of another table you could either link the table in
a combo box, list box or similar, or use something like dlookup to look the
data up, eg:
dlookup("FIELDNAME", "TABLENAME", "[IDFIELD] = " & me.FORMTEXTBOX)

Hope this helps.

Damian.

Ipsalateral said:
Hello, First let me thank you for the help ahead of time. I am a self
taught access database maker.
My database that I am rebuilding because a change happened in a regulation
I built it in excell first then transferred it to database so a user can get
the information at a later time.
The problem comes from the fact the the fields in excell have 72.5. U
can't use period in a field name, So I figured that if I make the field and
times the original by 10 (i.e. 725) I eliminate the period. Now comes the
problem. How can I get the form to pick the variable out that the user puts
in. I also have a table of Height &weight, and a table of general
information(i.e. name, id number). The user picks the form male or female
and puts the pertinent stuff in but how can I get the form to show the 725
entry (8 percent body fat) I tried a query and that does not seem to work.
If I put more then two tables/query on the query it will not let me add
records to the database, so I am at a loss. I know a little about vb and I
am thinking that is the answer but i am not sure. Can someone point me in
the right direction please? Way thanks ahead of time! A truely lost person.
 

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

Back
Top