Limiting insert into db

I have a form where the user selects a date to enter data into a form if no date found it can proceed (create) else you can only edit the data, I want to limit them to only being able to edit the data if it exists.

If I’ve ecplained that correct it sound like a simple task but I’m buggered if I can find how or where to do this

Don’t understand. Where the date should be filled? On a previous form? or how?

I think I don’t understand, some screenshot?

Disable/Enable the insert button depending on the result of your query.

in your onload or onnavigate event check for the result of the query and if you have data or not use the sc_btn_display(“Button_Name”,“on/off”) macro.

Regards