1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team-Mitglieder
    4. Trophäen
    5. Mitgliedersuche
  4. Tutorial Bereich
  • Deutsch
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  1. Informatik Forum
  2. Webmaster & Internet
  3. Entwicklung

Microsoft Access requery, data entry usw.

    • Frage
  • KITT
  • 4. April 2007 um 18:17
  • Unerledigt
  • KITT
    4
    KITT
    Mitglied
    Punkte
    105
    Beiträge
    13
    • 4. April 2007 um 18:17
    • #1

    Hi,

    Ich poste auf englisch, wenn es euch nicht stört (da ich schon einmal gepostet habe, nur leider vergeblich):

    I have two questions concerning forms

    Question 1:


    I have two subforms on exactly the same place. they are even the same, but one is for reading and the other one is for inserting records.

    I wanted to put depending on which command button was clicked, to show the one with Data Entry = true or Data Entry = false.

    how can I do
    Data Entry = true
    or
    Data Entry = false
    in VBA to diversify those forms? There is no field like that?

    a workaround (or maybe the most common solution) seems to be: docmd.gotorecord , , acNewRec. but it doesn't work. docmd.gotorecord shall display instead of an existing record the empty form with possibility to enter values?

    Question 2:

    I have a subform with a text box called textbox1. So, if I click textbox1, the combobox1 of the mainFrame should be updated with the value, I insert into the textBox1.

    the combobox1 was created with the wizard, so it has a query itself in the raw source. Select * from qry_selectMethod Where..."

    I read in many communities, that the combobox as a control source has strange behavior, and especially the requery method seems to have troubles.
    Especially: PRESSING F9 after having change the text box WORKS! Isn't that strange? But the requery command in vba code doesn't.

    here the textbox: Forms![frm_newEntry_newOutput]![frm_SeeMethodsForSelectedMethodType_newEntry].Form![textbox1]
    here the combobox: Forms![frm_newEntry_newOutput]![combobox1]

    Private Sub textbox1_AfterUpdate()
    Forms![frm_newEntry_newOutput]![cmb_combobox1].Requery
    End Sub


    Bitte um Hilfe!


    Thanks,
    Alex

  • KITT
    4
    KITT
    Mitglied
    Punkte
    105
    Beiträge
    13
    • 5. April 2007 um 10:22
    • #2

    Hi, also hier nochmal auf deutsch!


    Frage 1:


    Ich habe zwei Unterformulare an der selben stelle. Sie sind exakt gleich, nur das eine soll für lesen, und das andere für neue Einträge sein.

    Wie mache ich:
    Data Entry = true
    oder
    Data Entry = false
    in VBA um die Formulare zu unterscheiden? Ein entsprechendes Feld finde ich in VBA nicht.

    bzw. eine möglichkeit wäre docmd.gotorecord , , acNewRec. aber da habe ich probleme. der button wäre im mainForm, und der record wäre im Unterformular. Welche Parameter braucht dann docmd.gotorecord?
    Bis jetzt konnte ich da leider nichts finden! und ich habe gestern wirklich den ganzen tag gesucht.

    Frage 2:

    Ich habe ein Unterformular mit einer Text Box textbox1. Wenn ich in dieser textbox1 etwas eingegeben habe (ist bound mit einer query), soll die combobox1 des mainFrames aktualisiert werden und der Eintrag der textbox1 eingefügt werden.

    Die combobox1 wurde mit dem Assistenten erstellt, somit hat sie im Raw-Source eine query: "Select * from qry_SelectMethod...."

    Normalerweise geht dieses aktualisieren mit der Methode requery, aber ich habe schon gelesen, dass gerade die combobox Probleme verursacht und nicht entsprechend funktioniert.

    Dafür funktioniert das aktualisieren, wenn ich nach der Eingabe eines neuen records F9 drücke. Eigenartig!

    hier die textbox: Forms![frm_newEntry_newOutput]![frm_SeeMethodsForSelectedMethodType_newEntry].Form![textbox1]
    hier die combobox: Forms![frm_newEntry_newOutput]![combobox1]

    die methode die auf die textbox1 angewandt wird:
    Private Sub textbox1_AfterUpdate()
    Forms![frm_newEntry_newOutput]![cmb_combobox1].Requery
    End Sub

    Danke für Eure Hilfe!
    lg,
    Alex

  • Maximilian Rupp 27. Dezember 2024 um 12:05

    Hat das Thema aus dem Forum Programmieren nach Entwicklung verschoben.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!

Benutzerkonto erstellen Anmelden

Benutzer online in diesem Thema

  • 1 Besucher

Rechtliches

Impressum

Datenschutzerklärung

  • Alles
  • Dieses Thema
  • Dieses Forum
  • Seiten
  • Forum
  • Lexikon
  • Erweiterte Suche
  • Deutsch
  • English