Okay programmers this Is what’s up:
I am biuldiing a diabetic program, and the main area of topic is the Combo box. I have it coded so that the (list) insulin_nation is either Canada, USA, from there somethings hide and others show. On the click event of insulin_nation it pulls all the names from patient ad loads them in name_Combo (full name). What I want it to is select all the names from patient based on the choice from the list box (insulin_nation), who’s country in the patients table must match. I tried putting a filter on, it works but not eiffecently. So my two other choices would be SQL, or query. I am thinking SQL. Here is what I have so far:
Private Sub nation_Combo_AfterUpdate()
Dim nation As Variant
nation = nation_Combo
If nation = "Canada" Then
Me.name_Combo
SELECT name_Combo, country
from patient
where country = "Canada"
insulin_Combo.Visible = False
CAN_insulin_Combo.Visible = True
Zcell.Visible = True
ratio.Visible = False
corr_ratio.Visible = False
Else
mysql>SELECT full_name, country
from patient
where country = "USA"
insulin_Combo.Visible = True
CAN_insulin_Combo.Visible = False
Zcell.Visible = False
ratio.Visible = True
corr_ratio.Visible = True
End If
End Sub
View attachment diabetic.zip
I am biuldiing a diabetic program, and the main area of topic is the Combo box. I have it coded so that the (list) insulin_nation is either Canada, USA, from there somethings hide and others show. On the click event of insulin_nation it pulls all the names from patient ad loads them in name_Combo (full name). What I want it to is select all the names from patient based on the choice from the list box (insulin_nation), who’s country in the patients table must match. I tried putting a filter on, it works but not eiffecently. So my two other choices would be SQL, or query. I am thinking SQL. Here is what I have so far:
Private Sub nation_Combo_AfterUpdate()
Dim nation As Variant
nation = nation_Combo
If nation = "Canada" Then
Me.name_Combo
SELECT name_Combo, country
from patient
where country = "Canada"
insulin_Combo.Visible = False
CAN_insulin_Combo.Visible = True
Zcell.Visible = True
ratio.Visible = False
corr_ratio.Visible = False
Else
mysql>SELECT full_name, country
from patient
where country = "USA"
insulin_Combo.Visible = True
CAN_insulin_Combo.Visible = False
Zcell.Visible = False
ratio.Visible = True
corr_ratio.Visible = True
End If
End Sub
View attachment diabetic.zip