As the subject says, I have an Access Database being used on my computer... I want to connect to a MySQL database I created on a Godaddy hosted server, of which I am the admin of. I want to query the db to validate subscription status.
Access database has a field in a table for the users email address (which is how their subscription is recorded).
MySQL database has a few fields, but for the query I need to pull 2 fields (EMAILADDRESS, DATEENDING), with this I can determine if the user (by EmailAddress) is still authorized to use the Database(by DateEnding).
Can this be done in VBA code on the MAINfrm_Open Event? And if so, can I get some help with the connection string? I would imagine my SELECT qry would be:
Access database has a field in a table for the users email address (which is how their subscription is recorded).
MySQL database has a few fields, but for the query I need to pull 2 fields (EMAILADDRESS, DATEENDING), with this I can determine if the user (by EmailAddress) is still authorized to use the Database(by DateEnding).
Can this be done in VBA code on the MAINfrm_Open Event? And if so, can I get some help with the connection string? I would imagine my SELECT qry would be:
Code:
Dim VALIDATEsql
VALIDATEsql = "SELECT * FROM `PGRMAUTH` WHERE `MEMBERID` = " & forms!MAINfrm!MAINSUBfrm!MEMBERSEMAILbox.value '<-----Used the MyPHPAdmin SQL builder within the
'database management tools to build that. I know
'it's different than the way I would write it in VBA
'Code for SQL queries of my local tables.