Access-o-Mania

Access-Forum (Deutsch/German) => Access Programmierung => Thema gestartet von: elvodia am Januar 06, 2012, 12:13:15

Titel: Variable als Form angabe
Beitrag von: elvodia am Januar 06, 2012, 12:13:15
Ich möchte einen Formular Pfad in eine Var schreiben.

VAR_Form_input = "[FM_fahrtenbuch_eingabeform]"

Das geht wunderbar.

nun möchte ich in einem Anderen Form die Feld Angaben wie zum Bsp.:

VAR_von_ort = Forms![FM_Patient_suchen].list_patienten.Column(4)

ändern in

VAR_von_ort = VAR_Form_input.list_patienten.Column(4)

oder

DoCmd.Close acForm, "Forms![FM_Patient_suchen]"

in

DoCmd.Close acForm, VAR_FORM_input

Viel gegoogelt nix funktionierendes gefunden.
Titel: Re: Variable als Form angabe
Beitrag von: Beaker s.a. am Januar 06, 2012, 15:34:33
Hallo,
Forms(VAR_Form_input).list_patienten.Column(4)
oder, damit Du siehst, dass es auch mit Controls geht
Forms(VAR_Form_input).Controls(DeineStringVariable).Column(4)
DoCmd.Close acForm, Forms(VAR_Form_input)
hth
gruss ekkehard
Titel: Re: Variable als Form angabe
Beitrag von: DF6GL am Januar 06, 2012, 18:05:29
Hallo,

wobei da die Eckklammern nicht von Vorteil sind:

Dim str_Form_input as String

str_Form_input = "FM_fahrtenbuch_eingabeform"