I have a form called 'Form_show_login'
Inside is two textboxes, one called ownerName and one, ownerPassword
Also is a button called 'frmlogin'
I have two tables, one called DBOwners which has the fields, DBOwnerID (autonumber), DBOwnerName, DBOPass, DBGroupID (f-key) and DBAdmin (bool)
And one called DBGroups (DBGroupID, DBGroupName and DBGEmail)
when I click the button I want to do something like:
sql = "SELECT DBOwnerID, DBGroupID, DBAdmin FROM DBOwners WHERE DBOwnerName='" & ownerName.value & "' AND DBOPass='" & ownerPassword.value & "'"
it should only return one record (because DBOwnerName is unique). My question is, how do you get VBA to do this? I want a function to return True if a record is returned (a record would return if the username and password match-up) and False if no data is returned.
Any ideas?
Inside is two textboxes, one called ownerName and one, ownerPassword
Also is a button called 'frmlogin'
I have two tables, one called DBOwners which has the fields, DBOwnerID (autonumber), DBOwnerName, DBOPass, DBGroupID (f-key) and DBAdmin (bool)
And one called DBGroups (DBGroupID, DBGroupName and DBGEmail)
when I click the button I want to do something like:
sql = "SELECT DBOwnerID, DBGroupID, DBAdmin FROM DBOwners WHERE DBOwnerName='" & ownerName.value & "' AND DBOPass='" & ownerPassword.value & "'"
it should only return one record (because DBOwnerName is unique). My question is, how do you get VBA to do this? I want a function to return True if a record is returned (a record would return if the username and password match-up) and False if no data is returned.
Any ideas?