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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Forms



 
 
Thread Tools Display Modes
  #1  
Old December 19th, 2006, 01:58 AM posted to microsoft.public.access.forms
Tara_Casson
external usenet poster
 
Posts: 6
Default Forms

I Have to make a data base that needs a form to generate a number for me when
i click on one number. For example if i make a combo box , then in the form i
click on one of the numbers in that combo box it will automatically generate
the corresponding number into another filed. Is this possible to do?
  #2  
Old December 19th, 2006, 02:56 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default Forms

Tara,

While it's certainly possible to save it to a *field*, it is necessary.

One of the principles of database normalization is that each field is unique
and not dependent on another. If you have a rule that derives one number
from another, simply use that rule in a calculated field in a query, based
your form(s) and report(s) on the query, and place controls on your form or
query bound to the calculated field.

Alternatively, you can *display* the result of the calculation by setting
the ControlSource of the 2nd textbox to an expression. For example, if your
rule was to multiple the original number by 3 and add 1:

=[YourComboBox] * 3 + 1

Note that this will simply display the value and not save it to another field.

Sprinks


"Tara_Casson" wrote:

I Have to make a data base that needs a form to generate a number for me when
i click on one number. For example if i make a combo box , then in the form i
click on one of the numbers in that combo box it will automatically generate
the corresponding number into another filed. Is this possible to do?

  #3  
Old December 19th, 2006, 11:18 PM posted to microsoft.public.access.forms
Damon Heron
external usenet poster
 
Posts: 116
Default Forms

The second number is random?
If not, then what is the source of the number? Is it calculated from the
selected number?
Are both numbers stored in a table?

More Info, please....

Damon

"Tara_Casson" wrote in message
...
I Have to make a data base that needs a form to generate a number for me
when
i click on one number. For example if i make a combo box , then in the
form i
click on one of the numbers in that combo box it will automatically
generate
the corresponding number into another filed. Is this possible to do?



  #4  
Old December 19th, 2006, 11:31 PM posted to microsoft.public.access.forms
Tara_Casson
external usenet poster
 
Posts: 6
Default Forms

No it is not random. I have both sets of numbers in a table and i have a
query with both sets of numbers just not sure how to make it so i can click
on one number and it generate the corrsponding number

"Damon Heron" wrote:

The second number is random?
If not, then what is the source of the number? Is it calculated from the
selected number?
Are both numbers stored in a table?

More Info, please....

Damon

"Tara_Casson" wrote in message
...
I Have to make a data base that needs a form to generate a number for me
when
i click on one number. For example if i make a combo box , then in the
form i
click on one of the numbers in that combo box it will automatically
generate
the corresponding number into another filed. Is this possible to do?




  #5  
Old December 20th, 2006, 02:13 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default Forms

Tara,

Please explain how the number is generated.

Sprinks

"Tara_Casson" wrote:

No it is not random. I have both sets of numbers in a table and i have a
query with both sets of numbers just not sure how to make it so i can click
on one number and it generate the corrsponding number

"Damon Heron" wrote:

The second number is random?
If not, then what is the source of the number? Is it calculated from the
selected number?
Are both numbers stored in a table?

More Info, please....

Damon

"Tara_Casson" wrote in message
...
I Have to make a data base that needs a form to generate a number for me
when
i click on one number. For example if i make a combo box , then in the
form i
click on one of the numbers in that combo box it will automatically
generate
the corresponding number into another filed. Is this possible to do?




  #6  
Old December 21st, 2006, 05:35 AM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default Forms

On Mon, 18 Dec 2006 17:58:00 -0800, Tara_Casson
wrote:

I Have to make a data base that needs a form to generate a number for me when
i click on one number. For example if i make a combo box , then in the form i
click on one of the numbers in that combo box it will automatically generate
the corresponding number into another filed. Is this possible to do?


It may be simpler than you think.

Base the Combo Box on the table containing the two number fields;
include both fields, and sort on the first one (the one you'll look
up).

Put a Textbox on the form with a control source

=comboboxname.Column(1)

to display the second (it's zero based) column of the combo when you
select the first.

John W. Vinson[MVP]
  #7  
Old December 21st, 2006, 10:05 PM posted to microsoft.public.access.forms
Tara_Casson
external usenet poster
 
Posts: 2
Default Forms

I have done that and thank you that has worked but when i fill that in on the
form it isn't going in on the table how do i get it to transfer that
information onto the table

"John Vinson" wrote:

On Mon, 18 Dec 2006 17:58:00 -0800, Tara_Casson
wrote:

I Have to make a data base that needs a form to generate a number for me when
i click on one number. For example if i make a combo box , then in the form i
click on one of the numbers in that combo box it will automatically generate
the corresponding number into another filed. Is this possible to do?


It may be simpler than you think.

Base the Combo Box on the table containing the two number fields;
include both fields, and sort on the first one (the one you'll look
up).

Put a Textbox on the form with a control source

=comboboxname.Column(1)

to display the second (it's zero based) column of the combo when you
select the first.

John W. Vinson[MVP]

  #8  
Old December 21st, 2006, 10:47 PM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default Forms

On Thu, 21 Dec 2006 14:05:01 -0800, Tara_Casson
wrote:

I have done that and thank you that has worked but when i fill that in on the
form it isn't going in on the table how do i get it to transfer that
information onto the table


Storing it redundantly is a Bad Idea and is not necessary.

For a Report, you can create a Query joining your table to the table
with the two ID fields.

John W. Vinson[MVP]
 




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 03:43 AM.


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