Referencing values in a table

jeo

Registered User.
Local time
Today, 11:43
Joined
Dec 26, 2002
Messages
299
I have a form, from where I want to reference values in a certain table. The reason why I don't just use a "Default value" field is because this table will be dynamic and values in it will change from one project to another.
Should I use something like
tables!tblmytable!mydatafield or something else?
Right now I'm defining a new variable and that's the variable I want to assing whatever is in mydatafield.

Thanks for any help!
 
jeo,

To populate fields (controls) on a form, you can query from a table or use
the DLookUp function to retrieve from a table.

To put new values from controls into a table, you need an INSERT INTO
statement in SQL.

Need more specifics, or an example.

Wayne
 
I have a table with # of days assigned to each part of a project (programming, mapping, escrowanalisys, etc). On a form when I click a check box selecting a part of a project to be used (sometimes not all of them will be used) I have a table with a certain #of days assigned to each piece. I want to reference that value for #of days out of the table, and later add them all up to know how many days it will take on a particular project.
I actually want to assign a value from a table, to a new variable so I can add them up. I'm not sure if DlookUp will allow that.
Thanks again for all your help.
 
Still trying to figure this one out...
I tried using Dlookup, but it's saying "Argument not optional". And I'm still not sure if I will be able to add all of my values up (to calculate total days) from different events.
Any ideas?
Thanks!
 
jeo,

A query should suffice here. Can you post your table structure? Or a
sample database?

Wayne
 
I'm attaching a sample database.
On form frmProjectPieces after a user selects which piece(s) a particular project would include, I want the TotalDays from tblStaffDays to have an added value of days that associate with the checkboxes that were cheked by a user.
So in this case, TotalDays should be 4 (programming + escrow).
tblStaffDays could change - number of days for a particular piece could change as well as for different projects.
Thank you so much for all your help!
I aprreciate it!
 

Attachments

Thank you so much for all your help!
 

Users who are viewing this thread

Back
Top Bottom