Currently the link is ready. The function to be implemented is based on Cname.text. Search table category
There are only 2 fields in the category table, Cname and CID (pk)
How to make the program get the CID corresponding to Cname?
select * from category where cname = '"&cname.text&"' ??? Wouldn't it be that simple, what is the relationship between the two fields in your database?
select * from category where cname = '"&cname.text&"'
This is based on the content of cname.text as the search criteria, which is your cname field.
In this way, can not take out the corresponding id.