Textbox displays info but not editable

Giannis

New member
Local time
Today, 13:25
Joined
Nov 16, 2012
Messages
7
I have few (15) textboxes in a form where information can be displayed, if I want to change the displayed values I can not.
e.g. It display's the Address_No but if I want to change it i.e. from “9” to “11” it will not update and keep record.

My Textboxes do not have a control source. They can be displayed either from option 1 or 2:


  1. Me.Address_No = Me.ComboCities.Column(2)
  2. Address_No = DLookup("Address_No", "query2")


To populate date for the above mentioned TextBoxes I previously used 2 ComboBoxes, thus the reason I used the above two options.

Thank to you all in advance.
 
Do you have the controlsource of the textboxes set to those values. For example in the textbox control source does it say this: =Dlookup("address_No,"query2") and the other one =me.ComboCities.Column(2)? Or are you setting these values in code.
You can't update a textbox that has an expression as it's control source.
 
Do you have the controlsource of the textboxes set to those values. For example in the textbox control source does it say this: =Dlookup("address_No,"query2") and the other one =me.ComboCities.Column(2)? Or are you setting these values in code.
You can't update a textbox that has an expression as it's control source.

I am not using those expression in a control source but in a code:
OnClick
 
First off if you don't have a control source in the textboxes it's not going to stay updated once you move off the record? Is that the problem you are having - or does the value just not allow you to input it? What is your combo box bound to - does that have a control source
 
First off if you don't have a control source in the textboxes it's not going to stay updated once you move off the record? Is that the problem you are having - or does the value just not allow you to input it? What is your combo box bound to - does that have a control source

I have two cascading combo boxes that do not have a control source and are followed by text boxes (unbound and without control source) displaying info depending on the choices I made with the two combo boxes.
ComboStates followed by ComboCities and then text boxes display info of Cities as addresse, population ....

If I had one combo box the I would have a control source, and my text boxes could have control source, that was my first design but now I need 2 cascading combo boxes.

Thanks in advance.
 
So is your form bound to a table where you need to be able to store the address? Or are you simply trying to display the address info from the combo boxes. Do the values in the combos need to be stored in a particular field in your database?
 
So is your form bound to a table where you need to be able to store the address? Or are you simply trying to display the address info from the combo boxes. Do the values in the combos need to be stored in a particular field in your database?

I am selecting records through the combo boxes,
Form work as:
First combo - I select States
Second combo - I select the Cities from a particular State
On Click, text boxes follow displaying general info of the city.
Text box Address_No displays Address_No record from table.

I would like to override the Address_No record displayed and enter new info where it will be saved if I need to.
 
So as an example, if you choose California and then choose Los angeles your textbox called Address_No will display the field called Address_No? And you want to be able to manually change the Address_No in the textbox? Where do you want the new information that is over-riding saved to? Do you want it to be saved back to the combo box? Perhaps you should post your project because I'm not quite understanding what you need.
 
So as an example, if you choose California and then choose Los angeles your textbox called Address_No will display the field called Address_No? And you want to be able to manually change the Address_No in the textbox? Where do you want the new information that is over-riding saved to? Do you want it to be saved back to the combo box? Perhaps you should post your project because I'm not quite understanding what you need.

Please find attached my Project.
 

Attachments

So as an example, if you choose California and then choose Los angeles your textbox called Address_No will display the field called Address_No? And you want to be able to manually change the Address_No in the textbox? Where do you want the new information that is over-riding saved to? Do you want it to be saved back to the combo box? Perhaps you should post your project because I'm not quite understanding what you need.

I have attached a part of the project. I can give you an example
Combo States: Zone 1
Conbo Cities: ARTA
Text Box Population: 21
Text Box Address No: 8

I want to be able to change the numbers displayed in the text boxes
e.g Text Box Population: 30 instead of 21 and keep the changes to next time I run the form it will show 30.
 
I don't see the project attachment? Can you tell me the table your main form is bound to?? If you go into your form properties and tell me what the recordsource is: Go into your form design view and double-click the black left corner box to get to the form properties.

Also, you must have a control source behind your textboxes in order to have that data be saved in the table behind your form. What I think is happening is you have the combo box bound to the control.
 

Attachments

  • formproperties.jpg
    formproperties.jpg
    66.7 KB · Views: 128
I see your project now. Sorry - didn't realize it was in a different post. Let me take a look.
 
Okay, your problem is you don't have a recordsource in your form. You need to put table2 as a recordsource in your form and then a control source = Population for population and the control source AddressNo in the Address_No textbox. Like the attached screenshots:

However, this doesn't give your user any idea of what record they are on. You should also add the other fields from Table2 to your form, however, I'm not sure what you are trying to accomplish with this form. Perhaps if you explain your application it would help.

I think your tables are set up improperly for what you are trying to accomplish?
 

Attachments

  • screenshot1.jpg
    screenshot1.jpg
    85.3 KB · Views: 163
  • screenshot2.jpg
    screenshot2.jpg
    79.8 KB · Views: 135
  • screenshot3.jpg
    screenshot3.jpg
    64 KB · Views: 131
Okay, your problem is you don't have a recordsource in your form. You need to put table2 as a recordsource in your form and then a control source = Population for population and the control source AddressNo in the Address_No textbox. Like the attached screenshots:

However, this doesn't give your user any idea of what record they are on. You should also add the other fields from Table2 to your form, however, I'm not sure what you are trying to accomplish with this form. Perhaps if you explain your application it would help.

I think your tables are set up improperly for what you are trying to accomplish?

Here is what I am trying to do:
First user selects the level/floor (ComboLevel) and then selects a meter Combo Item ID Rearch.
When user make his/her selection other meter information are displayed though several textboxes.

With One filter I display and edit information because I as you said they have a control source.
Please find pic attached.

Now that I have to work with two combo boxes I do not know how to do this, and I am trying.
So I start working with a small database mimicking my project.

Any idea how I should approach my new task?
I will try and find more about recordset as you previously told me to.



I really appreciate your help
 

Attachments

  • METERS.accdb
    METERS.accdb
    832 KB · Views: 83
  • Meter Project - New Level Selection.jpg
    Meter Project - New Level Selection.jpg
    71.4 KB · Views: 139

Users who are viewing this thread

Back
Top Bottom