fargos99
02-03-2001, 07:48 AM
Maybe I'm doing it all wrong but here goes.
I want to pull a value from one field on a query that contains only one record, so that I can then use it in a calculation and I dont seem to be able to correctly do it.
Can anyone help.
Thanks
fargos99
02-04-2001, 10:58 AM
Thanks rich for your answer though I am still missing something.
The text box on my form called 'frmCeilings' is named 'txtMainTcost' and I want to put in the value held in the field named
'Cost per Metre' from the Query named 'MainTeesQ'
I have been trying to do this as per your advice for example
=DLookUp("[Cost per Metre]","MainTeesQ","[txtMainTcost] =" & [txtMainTcost])
but I must be doing something wrong as it is not working.
Thanks
If it's one fixed amount in the query you could use the default value of the text box to =DLookUp("YourFieldName","YourQueryName")
If the query contains multiple values then change the text box to a combo and set the control source using the query builder.
HTH