saving data from switchboard

  • Thread starter Thread starter yaniv d
  • Start date Start date
Y

yaniv d

hi all,
i have a switchboard that have already been built,my goal is to open
the same form with diffrect data(diffrent queries)
depending on the button that pressed
the buttons are connected to a switchboad table and some of them are
returning in diffrent places
how can i save the information coming from the table for using diffrent
data in one form
 
yaniv d said:
hi all,
i have a switchboard that have already been built,my goal is to open
the same form with diffrect data(diffrent queries)
depending on the button that pressed
the buttons are connected to a switchboad table and some of them are
returning in diffrent places
how can i save the information coming from the table for using diffrent
data in one form

You need a method of telling the form which query to use based upon your
switchboard selection. You could use the OpenArgs property to do this.
Example: on your button's Click event:

DoCmd.OpenForm "frmMyForm", , , , , , "1"

And in your form's Open even:

If Me.OpenArgs = "1" Then
Me.Recordsource = "qryWhatever"
ElseIf ... etc.

HTH - Keith.
www.keithwilby.com
 
hi keith,
thanks for your answer,
i stll bumping into 2 problem:

1.the command buttons opening forms depending on a table
in this table its basing on switchboardID that opening the form,

2.
the command buttons returning several of time in the switchboardID and
open diffrent form depend on the number so its a conflict regarding the
command button
 
Back
Top