Re: Problem mit Zugriff auf Listbox

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Peter Doering (nospam_at_doering.org)
Date: 09/02/04


Date: Thu, 2 Sep 2004 14:33:40 +0200

Hallo Karl,

On Thu, 2 Sep 2004 13:53:37 +0200, Karl Donaubauer wrote:
> Peter Doering wrote:
>> Ulrike Weber wrote:
>>> ...
>>> ich habe jetzt eines meiner vielen Probleme gelöst.
>>> Der Zugriff auf meine Listbox im UNterformular erfolgt
>>> folgendermaßen:
>>>
>>> Forms![ModifyMultipleDatasets]!sfrm_DatenAuswahl.Form!
>>> lstNichtGewaehlt.Value
>>
>> Richtig waere:
>
> _auch_
>
>> Forms![ModifyMultipleDatasets]!sfrm_DatenAuswahl!lstNichtGewaehlt.Value
>> ...
>
> An ihrer Version ist nichts falsch. Wie in FAQ 4.2 angeführt,
> funktioniert das Weglassen der Form-Eigenschaft erst seit A95.

Stimmt.

> In den entsprechenden OH-Texten wird nach wie vor die explizite
> Schreibweise gezeigt.

Stimmt nicht. Beispiel aus d. engl. A97-Hilfe:

| Control Object
| [...]
| ' Refer to a NewData control by using the subform Controls collection.
| Me.ctlSubForm.Controls!NewData

oder

| Refer to the value of a control or property in an expression
| [...]
| Forms![Orders]![Orders Subform]![Quantity]

Explizit auf Form bezogen sind Methoden und Eigenschaften des Forms selbst
(AllowEdits usw.) bzw. Aufrufe von Prozeduren und Funktionen des UFo's
angegeben, z.B:

| Refer to a form, report, subform, or subreport in an expression
| [...]
| Forms![Orders]![Orders Subform].Form

oder

| Call Procedures in a Subform or Subreport
| [...]
| Forms!Orders![Orders Subform].Form.ListNames

Gruss - Peter

-- 
Ich beantworte keine Fragen per Email.
Mitglied im http://www.dbdev.org
FAQ: http://www.donkarl.com


Relevant Pages

  • Re: Error 2427
    ... don't refer to a non-existent control in the detail section. ... > one of the Main form control AfterUpdate event the value of this subform ... > "dblTotalDesignMhrs" (see code below: ...
    (microsoft.public.access.forms)
  • Re: Linking forms - Oh GOD please help!
    ... Is it the name of the subform? ... not how you refer to it. ... Your main form has a control on it that contains the form that's being used ... >> Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.formscoding)
  • Re: Runtime 2455 Invalid reference to property form - Why doesnt this work?
    ... Never tried to refer to a sub-subform but might try addressing it directly as ... Property of a control on the second subform On Open of the main form. ... I keep getting the "2455 invalid reference to the property Form/ ...
    (microsoft.public.access.forms)
  • RE: More explantion on subform
    ... If you are referring to a subform that is on another form, ... The .Form there is telling Access we are talking about the form (subform) ... which is housed in the subform container control (control on the main form ... to refer to a control on the subform you would use ...
    (microsoft.public.access.forms)
  • Re: Combo box will not select values
    ... assuming that the name of the subform control is. ... "Rank" combo box on the main form to cboRank, as a field and combo box have ... >> a the rank of the new scout selected) ...
    (microsoft.public.access.modulesdaovba)