a little confusion

tselie115

Registered User.
Local time
Yesterday, 17:46
Joined
Aug 10, 2008
Messages
44
Dear all,

i got the attached database to calculate a formula based on a user input.
im using its tables as linked tables to seed combo box list of a Main database.
In the main database, i have a main form containing size1 and size2.
a subform material and a sub-subform named submaterials containing a field subtypes(combobox) listed from the linked table subtypes in the attached database and a dimension field to be calculated based on the formula from the linked table.
how can i calculate the dimension based on the formula(corresponding to the subtype chosed from the list) from the attached linked table knowing that the parameters are size1 and size2 from the main form.

thank you all
 

Attachments

May be its a joiners thing but what does size1p and the rest mean?

What I am thinking is you need another text box on the form that would have something like =[valx]+[valy]*[Formula] in its control source.

But that isnt going to work with text as your formula.
 
size1p is a value that shld replace valx in formula.
size2p for valy.
the parameters for the formula are getexposure(size1p,size2p,formula)
to calculate the furmula provided in the linked table with size1p and size2p.
the result should b a field called dimension in a subsub form of the main form containing size1p and size2p!
any ideas.
Ps. the formula should be based on the subtype chosen from the table in the combobox.
any ideas from experts?
 
I am sorry no experts around!! You will have to do with me.
As i said the problem is with your formula, you will not be able to perform a calculation on sizep1 + sizep2 *5.
What you need to do is replace thr formula with something like =([valx]+[valy])*5

You then need to add a control and some VB code like the example below which takes your formula and passes it to the control source of control txt1.

Code:
Private Sub txt1_GotFocus()
Dim temp As Variant
Dim txt1 As Variant

temp = Me.Formula.Value
'Stop
Me.txt1.ControlSource = temp
End Sub
 
[\code]
 
 
Hope this helps.
 
thanks for ur help!
i have another question.i think its obvious but since im new...
if i have a table that have name and nick name as fields.
its form has name wich is a combobox to chose among the list of the name from the table.
how to do if i wnt to show on the form the nickname correspoding to the name once i chose it from the combobox list?
 

Users who are viewing this thread

Back
Top Bottom