Return Query Value to Form Field

  • Thread starter Thread starter NeoFLeX
  • Start date Start date
N

NeoFLeX

Greetings:

I have a select query (Called queryPhones) that returns a single
result, with a single column called queryPhoneNumber. I want to be able
to set the default value of a Form field to the value returned by the
query. I'm using the code:

Forms!testConfirm!testPhone.DefaultValue = """" &
[queryPhones]![queryPhoneNumber] & """"

The query will only ever return one result.

NeoFLeX
neoflex at gmail dot com
 
Try:

Forms!testConfirm!testPhone.DefaultValue =
DFirst("[queryPhoneNumber]","queryPhones")

HTH,
Nikos
 
Back
Top