Hi all,
I need to sort out some coding to see if a record exists based on 2 fields...
lngzShowID and lnzgClassID in one form, being equal to that of the form which is issuing the command.
If it doesn't, then I will open a form with the command to add, but otherwise nothing will happen.
I know it needs to be something to do with Record Sets and also I have been reading about DCount? but not really sure what to do and not sure if there's a basic set of code that is needed to set it up and then I customise it?
Would I tell the database to run a query and then based on that, somehow "Get" the records that match from that. But I suppose that's where the recordset comes in.
Not doing this programming frequently enough, I don't know enough about it to even have a go!
So Basically,
On update of "lngzClassID" in Form 1,
run code to check if record on form 2 exists that matches both the showID and Class ID in form 1.
If not, create new record on form 2 with this info.
I appreciate your comments.
I need to sort out some coding to see if a record exists based on 2 fields...
lngzShowID and lnzgClassID in one form, being equal to that of the form which is issuing the command.
If it doesn't, then I will open a form with the command to add, but otherwise nothing will happen.
I know it needs to be something to do with Record Sets and also I have been reading about DCount? but not really sure what to do and not sure if there's a basic set of code that is needed to set it up and then I customise it?
Would I tell the database to run a query and then based on that, somehow "Get" the records that match from that. But I suppose that's where the recordset comes in.
Not doing this programming frequently enough, I don't know enough about it to even have a go!
So Basically,
On update of "lngzClassID" in Form 1,
run code to check if record on form 2 exists that matches both the showID and Class ID in form 1.
If not, create new record on form 2 with this info.
I appreciate your comments.