Text Box default value

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
 
D

Douglas J. Steele

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.
 
G

Guest

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
 
D

Douglas J. Steele

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top