CodePudding user response:
Is it the first selected provinces, then automatically shows the city belongs to the province?CodePudding user response:
The first change, get the current value, is subject to change the second dbcombbox corresponding data sets of data,CodePudding user response:
Here can't use DBcombobox,Because DBcombobox function is displayed directly, or change the value of the field,
Should use the Combobox control by selecting its value in shandong province ", "sample can filter data by SQL statements:
SQL:='Select * name of the table where provinces=' # 39 + Combobox1. Textt + # 39;
CodePudding user response:
Dblookupcombobox.CodePudding user response:
You can use the LOOKUP, the province and city is set to the master table, child table ZBXH=provinces, use ZBXH to LOOKUPCodePudding user response:
Table design for IP PIP name is ok, have a component automatically assembled into a tree structure,ID is the only number automatic growth
ID number of PID is its superior
The name is the name of the city or province
CodePudding user response:
I have made a choice to the province (city), city (district), county, and the street (township), village (neighborhood) database,1, choose by Combobox1, province (city), Combobox2 read in their city (area)
2, chosen by Combobox2, city (area), Combobox3 read in their county,
3, choose by Combobox3, county, Combobox4 read in their street (township)
4, choose by Combobox4, street (township), Combobox5 read in their village (neighborhood)
5, choose by Combobox5, village (neighborhood)
A ring by ring,
CodePudding user response:
Upstairs said very detailed, it is to read the database Combobox1 provinces, then write in Combobox2 through event querySQL: table name='Select city where provinces=' Combobox1. Text