I have 2 tables with identical fields. IssuedTo and ImportTempGRE. I would like to modify this code to compare the voucher# in ImportTemptbl then delete it from the IssuedTo table. This code will do this as written but it prompts me for the RST value. Which when I type in the value (Voucher#) it will delete that value from the IssuedTo Table. What I would like is for it to delete all the matching voucher #'s from the IssueTo table and not have it prompt the user. I'm pretty sure this can be fixed but I'm not to Sure how. All help is appreciated. Thanks.
Dim Rst As String
Dim IssuedTo As String
Dim ImportTemp As String
ImportTemp = "ImportTemptbl"
IssuedTo = "IssuedTo"
Rst = "[Tables]![ImportTemptbl]![Voucher#]"
DoCmd.RunSQL "Delete * from IssuedTo where [voucher#] = RST"