A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Populate a text box after update



 
 
Thread Tools Display Modes
  #1  
Old March 9th, 2010, 09:05 PM posted to microsoft.public.access.gettingstarted
Laura
external usenet poster
 
Posts: 458
Default Populate a text box after update

I am relatively new to Access programming. I have a database with a combo
box in which a user can select a task. The selection of the task in the
combo box runs code that populates a benchmark text box with a number
(example: the user chooses "Phone Call" in the task combo box, the benchmark
text box populates with "7"). I want to add another entered text box that
will look at the benchmark text box and it there is something in it, then it
populates with text, if the benchmark text box is blank then it leaves the
entered text box blank also. Please help. Thanks!
  #2  
Old March 9th, 2010, 10:12 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Populate a text box after update

Laura

What's the source of that additional data? Any chance you can include it as
one of the columns in the combobox's query (it wouldn't have to be visible)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"laura" wrote in message
...
I am relatively new to Access programming. I have a database with a combo
box in which a user can select a task. The selection of the task in the
combo box runs code that populates a benchmark text box with a number
(example: the user chooses "Phone Call" in the task combo box, the
benchmark
text box populates with "7"). I want to add another entered text box that
will look at the benchmark text box and it there is something in it, then
it
populates with text, if the benchmark text box is blank then it leaves the
entered text box blank also. Please help. Thanks!



  #3  
Old March 11th, 2010, 04:41 PM posted to microsoft.public.access.gettingstarted
Laura
external usenet poster
 
Posts: 458
Default Populate a text box after update

The benchmark data comes from VB code that says if the task = "phone call",
then benchmark = "7". Now I want to say if the Benchmark is not blank,
return "text" into another text box.

"Jeff Boyce" wrote:

Laura

What's the source of that additional data? Any chance you can include it as
one of the columns in the combobox's query (it wouldn't have to be visible)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"laura" wrote in message
...
I am relatively new to Access programming. I have a database with a combo
box in which a user can select a task. The selection of the task in the
combo box runs code that populates a benchmark text box with a number
(example: the user chooses "Phone Call" in the task combo box, the
benchmark
text box populates with "7"). I want to add another entered text box that
will look at the benchmark text box and it there is something in it, then
it
populates with text, if the benchmark text box is blank then it leaves the
entered text box blank also. Please help. Thanks!



.

  #4  
Old March 11th, 2010, 05:00 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Populate a text box after update

So you're saying that for each option chosen, you have to
include/update/maintain your VB code?

Another option that Access offers is the notion of a "lookup table". In
that table, you'd pair chosen values ("phone call", etc.) with their
corresponding benchmark values (ie., "7", etc.).

That way, you could use a combobox in your form to allow folks to select the
proper "task", and have Access automatically identify the correct
"benchmark". And when a new task pops up, you just make an entry in the
lookup table -- that's all!

(by the way, if there really is a one-for-one relationship between task and
benchmark, you don't need to store the benchmark. Knowing the task means
knowing the benchmark.)

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


"laura" wrote in message
...
The benchmark data comes from VB code that says if the task = "phone
call",
then benchmark = "7". Now I want to say if the Benchmark is not blank,
return "text" into another text box.

"Jeff Boyce" wrote:

Laura

What's the source of that additional data? Any chance you can include it
as
one of the columns in the combobox's query (it wouldn't have to be
visible)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"laura" wrote in message
...
I am relatively new to Access programming. I have a database with a
combo
box in which a user can select a task. The selection of the task in
the
combo box runs code that populates a benchmark text box with a number
(example: the user chooses "Phone Call" in the task combo box, the
benchmark
text box populates with "7"). I want to add another entered text box
that
will look at the benchmark text box and it there is something in it,
then
it
populates with text, if the benchmark text box is blank then it leaves
the
entered text box blank also. Please help. Thanks!



.



  #5  
Old March 11th, 2010, 05:45 PM posted to microsoft.public.access.gettingstarted
Laura
external usenet poster
 
Posts: 458
Default Populate a text box after update

That would be much simpler than what I was doing I think. I will give that a
shot! Thanks for your help Jeff.

"Jeff Boyce" wrote:

So you're saying that for each option chosen, you have to
include/update/maintain your VB code?

Another option that Access offers is the notion of a "lookup table". In
that table, you'd pair chosen values ("phone call", etc.) with their
corresponding benchmark values (ie., "7", etc.).

That way, you could use a combobox in your form to allow folks to select the
proper "task", and have Access automatically identify the correct
"benchmark". And when a new task pops up, you just make an entry in the
lookup table -- that's all!

(by the way, if there really is a one-for-one relationship between task and
benchmark, you don't need to store the benchmark. Knowing the task means
knowing the benchmark.)

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


"laura" wrote in message
...
The benchmark data comes from VB code that says if the task = "phone
call",
then benchmark = "7". Now I want to say if the Benchmark is not blank,
return "text" into another text box.

"Jeff Boyce" wrote:

Laura

What's the source of that additional data? Any chance you can include it
as
one of the columns in the combobox's query (it wouldn't have to be
visible)?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"laura" wrote in message
...
I am relatively new to Access programming. I have a database with a
combo
box in which a user can select a task. The selection of the task in
the
combo box runs code that populates a benchmark text box with a number
(example: the user chooses "Phone Call" in the task combo box, the
benchmark
text box populates with "7"). I want to add another entered text box
that
will look at the benchmark text box and it there is something in it,
then
it
populates with text, if the benchmark text box is blank then it leaves
the
entered text box blank also. Please help. Thanks!


.



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.