Changing data source based on a combobox (1 Viewer)

JCColindres

Registered User.
Local time
Yesterday, 17:55
Joined
Nov 29, 2019
Messages
15
Hi guys,

I'm trying to create a data entry form based on comboboxes, and Im having a really hard time finding a solution for this, I apologize in advance for my lack of vocabulrry but Im new to access.

Here is the situation I have a combobox named "Topic" with 5 values, when I hit save all the selections are saved on a table, now when I select the value "other" on the combobox a textbox "define" becomes available for the users to input their own definition, so far so good.

Now what I need to acomplish is, when "other" is selected, the data from "Define" instead of the one from "Topic", is the one saved on the "Topic" field on the table.

If you need any further information please let me know.


Thank you in advance.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:55
Joined
Oct 29, 2018
Messages
21,541
Hi. Not sure if I understood but maybe in the AfterUpdate of Define, you can copy it to Topic. For example:
Code:
Me.Topic = Me.Define
Hope it helps...
 

JCColindres

Registered User.
Local time
Yesterday, 17:55
Joined
Nov 29, 2019
Messages
15
thanks theDBguy

Here is the thing by default the data from topic is saved on the cases table under the topic field.

What I need is, when "other" is selected de data from the define textbox is the one saved on the table instead of the one from topic.
 

Attachments

  • Db1.png
    Db1.png
    32.9 KB · Views: 78
  • Db2.png
    Db2.png
    5.3 KB · Views: 77

JCColindres

Registered User.
Local time
Yesterday, 17:55
Joined
Nov 29, 2019
Messages
15
Thi is whats happening on the table when I select Other
 

Attachments

  • DB3.png
    DB3.png
    39.1 KB · Views: 79

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:55
Joined
Oct 29, 2018
Messages
21,541
thanks theDBguy

Here is the thing by default the data from topic is saved on the cases table under the topic field.

What I need is, when "other" is selected de data from the define textbox is the one saved on the table instead of the one from topic.

Hi. I thought that's what I said. When you do Me.Topic = Me.Define then you are copying what's in Define into Topic. So, when you save the record, whatever was in Topic gets saved into the table. And since it's a copy from Define, you're basically storing what was in Define into the Topic field in the table. Is that not what you wanted?
 

JCColindres

Registered User.
Local time
Yesterday, 17:55
Joined
Nov 29, 2019
Messages
15
My friend you are a genious,

Thank you very much!!!!!!!
 

Users who are viewing this thread

Top Bottom