Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33

    Hello, I'm back again.

    The attached data base is an extract of the original, but contains all which is needed to understand my problem.

    Please call the macro Auftragsverwaltung an give ks as Kundencode in the asking message. Then the form ufAuftragsverwaltung opens, with the sub form ufAuftrags_Proben , which contains the sub form ..._Mesblocks and this one contains ..._Messungen , which is the one with the command button cmdFreigabe and the label Freigabestatus on the right. This last control is the one I need to change (caption and color). Clicking on the command button opens one of the forms ufMessung_Freigabe and ...Freigegeben, depending on the state of the Yes/No field Freigegeben. This field is then changed by the called form.

    What else? I'll wait for questions or comments.
    Attached Files Attached Files

  2. #17
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    I suspect that this db is being developed for German speaking users. Unfortunately I only understand English which, along with knowing nothing about what your db is for, is making this a rather difficult task.

    From your last post:
    ....depending on the state of the Yes/No field Freigegeben....
    Where can this "Yes/No field" be found please.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #18
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33
    Freigegeben is in DAT03-Messungen

  4. #19
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33
    I'm sorry about the German...
    These are measurements, which included in a block are used to produce a report. The measurements are provided for a sample as part of an assignment. And the report should only show data if the measurement has been given free (freigegeben).

    But I doubt this will be of much help...

  5. #20
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by walterio View Post
    Freigegeben is in DAT03-Messungen
    Is that shown on any open form/subform
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #21
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by walterio View Post
    I'm sorry about the German...
    These are measurements, which included in a block are used to produce a report. The measurements are provided for a sample as part of an assignment. And the report should only show data if the measurement has been given free (freigegeben).

    But I doubt this will be of much help...
    No apology needed . Nobody's fault that it is in German. Just explaining my difficulty in helping. Your English in this post is excellent though .
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #22
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33
    The value of »Freigegeben« is shown indirectly by the caption and forecolor of the label »Freigabestatus«, which are set in the form event OnCurrent of the form »ufAuftrags_Messungen«. This Form displays the records of »DAT03-Messungen«, where the field is defined.

  8. #23
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    In post #5 you said:
    This is the code:
    Parent.Freigabestatus.Caption = "soso"
    and it results in a runtime error 2452: The expression you entered has an invalid reference to the Parent property.

    I also tried Parent.Freigabestatus!Caption an other combinations of . !

    And I use in in the click Event of a command button, but I don't think that matters..
    If you use the line:

    Me.Freigabestatus.Caption = "soso"

    there is no error and the caption used in
    Freigabestatus does change to "soso".

    Does this help?

    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  9. #24
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33
    The label Freigabestatus is in the form ufAuftrag_Messungen.
    To change it, depending on the action taken by the user in the called forms ufMessung*, I should be able to receive a message of the called form: user-did-change-the-status or nothing. Something equivalent to OpenArgs...

  10. #25
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33
    My attempt with Parent.Freigabestatus.Caption = "soso" was intended to be used in the called form, which I now understand is not a sub form and therefore could not work.


  11. #26
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Have you considered declaring a variable in your module called "Aufgabenaufrufe" perhaps "Public blnFromForm As Boolean".

    This could then be set a value before opening either form in the button's On Click event and the value of the variable could be reset if appropriate before each form is closed.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  12. #27
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33
    That is very clever!
    But in the calling sub form, where do I position the "asking" after I opened one of the forms?
    The forms get opened in a procedure from the click event on the command button "Freigabe". I will see, if blnFromForm is changed immediately after the open command.
    ... (few minutes later)
    No, it didn't work. While debugging step by step, I noticed that after the open command the next step was still on the calling form. The called one waited until the procedure was ended...

  13. #28
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by walterio View Post
    That is very clever!
    But in the calling sub form, where do I position the "asking" after I opened one of the forms?
    The forms get opened in a procedure from the click event on the command button "Freigabe". I will see, if blnFromForm is changed immediately after the open command.
    ... (few minutes later)
    No, it didn't work. While debugging step by step, I noticed that after the open command the next step was still on the calling form. The called one waited until the procedure was ended...
    Sorry, forgot to say that the two forms opened from the button need to be opened in Dialog mode which stops the button code from running until the opened form is closed.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  14. #29
    walterio is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2019
    Posts
    33
    Yes! That was it, what I was looking for. Thank you very much.

  15. #30
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by walterio View Post
    Yes! That was it, what I was looking for. Thank you very much.
    Your welcome. Only sorry that it took me so long to fully understand the requirement.
    BTY thank you for your kind words left in the reputation comments. If you're ever near my part of the world (Essex in England) send me a private message. Always glad to make a new acquaintance
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. subform openform
    By slimjen in forum Forms
    Replies: 4
    Last Post: 06-21-2019, 11:31 AM
  2. Replies: 11
    Last Post: 08-22-2017, 05:50 PM
  3. Replies: 1
    Last Post: 09-12-2014, 06:09 AM
  4. Replies: 3
    Last Post: 10-07-2013, 12:27 PM
  5. Replies: 2
    Last Post: 12-17-2010, 11:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums