Need help with action button

Need help with action button

I can’t get a custom action button to work.   I have two tables:

Events (parent table)

                Fields: Event, Event_Date

RSVP (child table):

                Fields: RSVP Date, Name, Email, EventID (lookup ) and its related fields – Event, Event_Date, ID

I set up a relationship between the two tables with a lookup field in RSVP called EventID that relates to the Events’ ID field.   I created the following function for the button in Events (to show on all records):

void rsvp.makersvp (int ID)

{

openUrl("#Form:RSVP?EventID=" + input.ID + "", "same window");

}

My goal is for the custom button to open a RSVP form that has the Event field populated with the event.  By the way, the RSVP form is not stateless (it’s connected to a view called RSVP View).  Thanks for your help.