I'm sure that this question will be pretty elementary for most of you, but I'm self-teaching myself Access 2000 and have run into a snag that I hope you can help me out with.

In my database, I have a form that contains a subform. The subform is based on a query and lists all database records. Other than the subform, the main form only contains command buttons. The main command buttons I want to have will be for things like adding, editing, and deleting records.

I would like for the user to be able to select a record in the subform by clicking on it, and then click the appropriate command button to pull this record up into either an "Edit Record" form or a "Delete Record" form (both of which I have already created). Unfortunately, I have not been able to get my VBA code set up correctly so that it grabs the record that has been selected. I just get a pop-up saying, "You can't go to the specified record."

So how does one do this? Thanks for your help.