Change Linked Fields String/s (1 Viewer)

vagues0ul

Registered User.
Local time
Yesterday, 23:22
Joined
Sep 13, 2018
Messages
103
I have a form that is based on a query which is taking data from three forms. I need a button on the form that that change the value of a field depending on the value of a dropdown box on the form. Its a student form and all the students are in a specific class. The thing i want to achieve is to promote students of a specific class to another class depending the class name (which will be in the comboBox). Kindly assist how to achieve this. Thanks!
 

Attachments

  • qry.png
    qry.png
    14.2 KB · Views: 48

Ranman256

Well-known member
Local time
Today, 02:22
Joined
Apr 9, 2015
Messages
4,339
normally queries take data from tables (not forms) ,your photo shows tables.
but if you want a text box to fill based on the combo,
make the combo have 2 columns,
user picks the item in col 1, then use code to fill the text box with col 2.
(NOTE: in vb, columns begin with zero)

Code:
sub cboBox_Afterupdate()
txtBox = cboBox.column(1)  'actually col 2
end sub
 

vagues0ul

Registered User.
Local time
Yesterday, 23:22
Joined
Sep 13, 2018
Messages
103
Code:
sub cboBox_Afterupdate()
txtBox = cboBox.column(1)  'actually col 2
end sub
[/QUOTE]

Thanks for your answer. I dont want the textbox to be filled based on a combo. The student tables is linked with Class table and each class is linked to multiple students. like

Student1 = class a
student2 = class a
student3 = class a
student4 = class a

student 5 = class b
student 6 = class c and so on...

i want a code that can change the class of students to another class. like student 1 to student 4 need to be promoted to class C. so instead of changing their class one by one. I want a script that can change the class of students at once.

i hope that i made my query clear now :)
 

Users who are viewing this thread

Top Bottom