Delete record on subform?

Defvron

New member
Local time
Today, 17:10
Joined
Dec 3, 2004
Messages
5
Hi!

I have a main form with two subforms on it (subform1, subform2).

In maniform you can chose from a combobox employees which updates subform2 with projects that employee has. Subform1 contains projects where employees can chose to add a new project to their list.

All this works fine.

My problem is then I want the possibility to delete a chosen project from subform2 with a commandbutton. I have used the wizard and checked the forum for answers.
The problem is even without code at all just an event I get error.
I have a swedish version but I will try translate the error message:

"The expression On Click you have as value on eventhas caused following error: An error has occured in the communication between Microsoft Access and the objectprogram or ActiveX-control.
*The expression didnt result in a macroname, name on a userdefined funktion or [event].
*An error occurred on running of a function, event or macro."

I have no clue on thats wrong. I have tried to make a macro in the subform2 and it works great. I have event-code in subform1 which work great.
 
The button is on the subform (subform2) and is made with the wizard.

Have added a picture on the three forms. The arrow points att subform2 and the button I want to use to delete the record it is on. Click on button and it should delete the current record - but only generates an error.
 

Attachments

  • access.GIF
    access.GIF
    28.5 KB · Views: 171
Last edited:
Problem solved

Must been an error in the subform2. Because then I made a new form just the same as subform2 and put it in subform2 place it suddenly worked like it should.
 

Users who are viewing this thread

Back
Top Bottom