Combobox to text field input (1 Viewer)

Aimn_4U

Registered User.
Local time
Today, 15:34
Joined
May 14, 2019
Messages
33
Hi All,

Hoping someone can help me again.

I have a combo box on a form that has a code and a title. Once the selection has been made it puts the title of the selected code into a text box (automatically).
There is also 'equivalents' to some of these units, and if the equivalent is stated in the table, it also put this title into another text box.

I need to do this again, however as I worked on this months ago, I can no longer figure out how I did it.

I have tried building the enw one exactly the same, and I cannot see any codes that I used to make this happen. I have checked the settings and the control source, however for the life of me I cannot see how I got the other one to work.

Has anyone got any suggestions or help on where I am going wrong.

I have attached some screen shots to try and explain better.
 

Attachments

  • comboBox internal.PNG
    comboBox internal.PNG
    42.1 KB · Views: 78
  • combo Box internal selection.PNG
    combo Box internal selection.PNG
    24.6 KB · Views: 65

theDBguy

I’m here to help
Staff member
Local time
Today, 00:34
Joined
Oct 29, 2018
Messages
21,471
Hi. The screenshots may not be enough to help us understand what's happening. Are you able to post a sample copy of your db instead?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:34
Joined
May 7, 2009
Messages
19,241
check the rowsource of the combo, maybe you can find the answer there.
 

Aimn_4U

Registered User.
Local time
Today, 15:34
Joined
May 14, 2019
Messages
33
HI DB_guy,

Thank you, I have done up a Dummy of my Database Quickly so I can explain what i was talking about.

If you enter the 'database administration' part, then click on 'Add New Precedent'.
Now if you Select an 'Internal Unit code', it will automatically enter the Internal Unit code, Version, Internal Unit Title, OUA equivalent Unit code, version and OUA Equivalent title.

Now what I have been trying to do is apply the same concept, when I enter the OUA equivalent unit code first it will automatically generate all of the other information (Internal code, Internal Unit title etc).

I cannot figure out how I did it previously and why it is not working now.

If you have any further questions please let me know.

(Also this is my first ever database I have built so I am sure there are many other errors etc, please don't judge :D )
 

Attachments

  • Dummy Database.accdb
    1.9 MB · Views: 73

Aimn_4U

Registered User.
Local time
Today, 15:34
Joined
May 14, 2019
Messages
33
Hi Arnelgp,

thank you for the suggestion, however I have checked this and cannot see that there is an issue.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:34
Joined
Oct 29, 2018
Messages
21,471
HI DB_guy,

Thank you, I have done up a Dummy of my Database Quickly so I can explain what i was talking about.

If you enter the 'database administration' part, then click on 'Add New Precedent'.
Now if you Select an 'Internal Unit code', it will automatically enter the Internal Unit code, Version, Internal Unit Title, OUA equivalent Unit code, version and OUA Equivalent title.

Now what I have been trying to do is apply the same concept, when I enter the OUA equivalent unit code first it will automatically generate all of the other information (Internal code, Internal Unit title etc).

I cannot figure out how I did it previously and why it is not working now.

If you have any further questions please let me know.

(Also this is my first ever database I have built so I am sure there are many other errors etc, please don't judge :D )
Hi. I'm about to go to bed but just as a quick test, try decompiling your project to see if anything changes after doing so.
 

Aimn_4U

Registered User.
Local time
Today, 15:34
Joined
May 14, 2019
Messages
33
Hi DB_guy,

Thank you for your suggestion. I have tried decompiling as suggested and unfortunately it hasn't worked :banghead:
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 08:34
Joined
Jul 9, 2003
Messages
16,280
Have a look at at "Get info from a combobox" on this this webpage:-

https://www.niftyaccess.com/combo-box/

on Nifty Access.

Edit:-
For example, if you have a Combobox "cboMyCombo" and a Textbox "txtMyTextBox"

In the Textbox Control Source, you add code that captures hidden information from the combo box ...

In "txtMyTextBox" Control Source:-

= cboMyCombo.Column(1)

Where column 1 is the second piece of information in the Combobox, as the fields in the combo are ordered 0, 1, 2, etc.....

Sent from Newbury UK
 
Last edited:

Users who are viewing this thread

Top Bottom