-----Original Message-----
Mike,
Here is one method using a Delete query SQL statement. In
the OnClick event of the command button put the following.
If you have the Cascade Delete turned on it should prompt
you about also deleting the child records if you delete the
parent so we will just have to delete the record from the
parent table. You would be better off putting in the user ID
in case you had two Mike's, but here is how to do it for the
name. It is kind of hard to see but I am using single quote
then double quote, then double, single, double.
Dim strSQL as String
strSQL = "DELETE * FROM tblUser WHERE [UserName] = '" &
Me!DelUser & "'"
DoCmd.RunSQL strSQL
Gary Miller
mike said:
I have done all those steps already. But I jst want to
know if it is possible to create a command button ( calls
Delete) and the command button takes the parameter from a
text box( the text box name property is call DelUser) and
delete the records base on the parameter. For example:
Enter user name: mike
Delete
Once the delete button is clicked, the delete button will
take the name "mike" and delete its record and all records
related to mike. This includes the userID,name, and any
records in the userInfo tables.
Any suggestion on how to do it??
Thanks,
mike
cloudy
on record
you table,1
to
reference
a wrote
in from
a parameter.
Is
.