Hi
Please excuse me but I'm new to this tool, as you will soon appreciate by my question. I want to do the following command
delete from
Table1
where
Table1.film_fk = forms!this_form!film_fk
on the Sub OK_Click() event of a command button, where
forms!this_form!film_fk is a text box on the current form that is a display of a field in the returned dataset of a query.
This should be extremely basic I know, but I've tried DoCmd.RunSQL, and I've tried something.execute I think, and I've tried referring to text box contents in the long hand (as above) and also in the short hand as just
film_fk and I've tried using & to denote variable rather than variable_name and I've followed the help specifically as to how to place the arguments for the command, but I just cant make it do this simple command. What am I doing wrong exactly? Should I be using DoCmd to execute SQL based on an argument present in the control source of the form?
Any Help greatly appreciated.
My Regards
Sply
Please excuse me but I'm new to this tool, as you will soon appreciate by my question. I want to do the following command
delete from
Table1
where
Table1.film_fk = forms!this_form!film_fk
on the Sub OK_Click() event of a command button, where
forms!this_form!film_fk is a text box on the current form that is a display of a field in the returned dataset of a query.
This should be extremely basic I know, but I've tried DoCmd.RunSQL, and I've tried something.execute I think, and I've tried referring to text box contents in the long hand (as above) and also in the short hand as just
film_fk and I've tried using & to denote variable rather than variable_name and I've followed the help specifically as to how to place the arguments for the command, but I just cant make it do this simple command. What am I doing wrong exactly? Should I be using DoCmd to execute SQL based on an argument present in the control source of the form?
Any Help greatly appreciated.
My Regards
Sply