Text Box default value

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

Guest

Hello.
I have a form and on this form I have a text box called "FE Owner".
This text box does not have a control source to any table.

What I need is the default value of this text box to point to a table called
"tbl_FEOwner" and to a field called "DB Front End Owner"
I only have one person in the table field. I have tried using:
=[tbl_FEOwner]![DB Front End Owner]
but id doesn't work.
I even added a second field to the table called "Default" with a Yes/No
field and tried linking the text box somehow to the "DB Front End Owner"
field with a check, but cant'.
What am I doing wrong?

Iram/mcp
 
You cannot retrieve data like that.

Try:

=DLookup("[DB Front End Owner]", "[tbl_FEOwner]")

Another option to keeping it in a table, by the way, would be to create a
database property and set it. Check the CreateProperty method in the Help
file for an example.
 
Perfect! The =Dlookup code worked perfectly!

Thanks.


Douglas J. Steele said:
You cannot retrieve data like that.

Try:

=DLookup("[DB Front End Owner]", "[tbl_FEOwner]")

Another option to keeping it in a table, by the way, would be to create a
database property and set it. Check the CreateProperty method in the Help
file for an example.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Iram said:
Hello.
I have a form and on this form I have a text box called "FE Owner".
This text box does not have a control source to any table.

What I need is the default value of this text box to point to a table
called
"tbl_FEOwner" and to a field called "DB Front End Owner"
I only have one person in the table field. I have tried using:
=[tbl_FEOwner]![DB Front End Owner]
but id doesn't work.
I even added a second field to the table called "Default" with a Yes/No
field and tried linking the text box somehow to the "DB Front End Owner"
field with a check, but cant'.
What am I doing wrong?

Iram/mcp
 
Yes, it will work perfectly...until you put another row in the table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Iram said:
Perfect! The =Dlookup code worked perfectly!

Thanks.


Douglas J. Steele said:
You cannot retrieve data like that.

Try:

=DLookup("[DB Front End Owner]", "[tbl_FEOwner]")

Another option to keeping it in a table, by the way, would be to create a
database property and set it. Check the CreateProperty method in the Help
file for an example.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Iram said:
Hello.
I have a form and on this form I have a text box called "FE Owner".
This text box does not have a control source to any table.

What I need is the default value of this text box to point to a table
called
"tbl_FEOwner" and to a field called "DB Front End Owner"
I only have one person in the table field. I have tried using:
=[tbl_FEOwner]![DB Front End Owner]
but id doesn't work.
I even added a second field to the table called "Default" with a Yes/No
field and tried linking the text box somehow to the "DB Front End
Owner"
field with a check, but cant'.
What am I doing wrong?

Iram/mcp
 
I totally understand. Thanks.
IRam

Douglas J. Steele said:
Yes, it will work perfectly...until you put another row in the table.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Iram said:
Perfect! The =Dlookup code worked perfectly!

Thanks.


Douglas J. Steele said:
You cannot retrieve data like that.

Try:

=DLookup("[DB Front End Owner]", "[tbl_FEOwner]")

Another option to keeping it in a table, by the way, would be to create a
database property and set it. Check the CreateProperty method in the Help
file for an example.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Hello.
I have a form and on this form I have a text box called "FE Owner".
This text box does not have a control source to any table.

What I need is the default value of this text box to point to a table
called
"tbl_FEOwner" and to a field called "DB Front End Owner"
I only have one person in the table field. I have tried using:
=[tbl_FEOwner]![DB Front End Owner]
but id doesn't work.
I even added a second field to the table called "Default" with a Yes/No
field and tried linking the text box somehow to the "DB Front End
Owner"
field with a check, but cant'.
What am I doing wrong?

Iram/mcp
 
Back
Top