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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|