Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 57
  1. #16
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The filtering of form is not relevant. Check out this revision of project.

    I removed dates from the 3 fields for the Banco producto as a test.



    EDIT: Purpose served, file removed.
    Last edited by June7; 12-23-2011 at 01:33 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #17
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169

    How do I see only fields that are filled?

    Perfect. Excellent. Just as I wanted.
    I do not want to seem boring. The idea is to hide fields from my boss, who asked me to make this database. Just like you, to me makes no sense.
    Also, how do I get the other fields "rise" to the position of the field that was invisible (do not empty space)


    Is that if I try it will work.

    If IsNull (Forms! fFiltros! Rótulo175!) Or Forms! FFiltros! Rótulo175! Brand = "" Then
    Me.subFormComp.Height = 0
    Me.subFormComp.Visible = False
    ElseIf Not IsNull (Forms! frmConsulta! SubFormComp! Brand) Then
    Me.subFormComp.Height = 1900
    Me.subFormComp.Visible = True

    I do not know where and how to put this code and the syntax is correct. For me it will take a long time to test all possible combinations (I got this code from a model).

  3. #18
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Height is not the correct property. That will change the vertical dimension of the control. You want to position the control. Those are Left and Top properties. Top units are in TWIPS. 1 inch = 1440 twips. Left units are inches. (Height and Width also use TWIPS, no idea why Left is different).

    You would have to change the Top property of controls. Trying to program this will drive you crazy - too much variability in positioning. I would not. Better would be to change the data structure as I described earlier.

    EDIT: Well, after saying I would not do this kind of coding, I found it intriguing enough to tackle the challenge. Here is the result. I still don't understand why anyone would want this on a form, a report maybe, but not a form.

    EDIT: Purpose served, file removed.
    Last edited by June7; 03-22-2012 at 12:39 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #19
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169

    How do I see only fields that are filled?

    Genius! Genius! Genius!

    I try to create a way to enter values ​​in the same form. I will create a button to open a pop-up in each combo to add records. And then buttons, the steps to appear empty. I think it'll be a little complex, but God willing I can. Then I PROVIDE it on the network in order to help others. (Of course I'll put their credits, about 93.4%).

    Thank you. I can not thank. I certainly could never do that alone.
    I wish you a Merry Christmas and a great 2012 for you and your whole family.
    May God bless you.

    Again, thank you.

    Fabio.


    * If you ever come to Brazil, I try (fabiobarreto10@gmail.com), despite not speaking English, I am studying.

  5. #20
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Hello June.

    I'm trying to insert records in combos. Place the following code in the property if not listed:


    Private Sub combAnalista_NotInList (NewData As String, Response As Integer)

    Dim sql As String
    False DoCmd.SetWarnings
    If MsgBox ("Client not registered" & Chr (13) & Chr (13) & "Would you like to register the Customer" & _
    UCase (NewData) & "now?", VbYesNo, "Register") = vbYes Then
    sql = "INSERT INTO tAnalista (NomeDoAnalista) VALUES ('" & NewData & "')"
    DoCmd.RunSQL sql
    Response = acDataErrAdded
    else
    Response = acDataErrDisplay
    end If


    end Sub

    Repeat the code in the other two combos, changing the names of tables and fields, but only worked on the 1st combo.
    Any tips?

    Thank you.

  6. #21
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not understanding why this works because there is no field called NomeDoAnalista in tAnalista. Same for NomeDoProduto and NomeDaEmpresa for their respective tables. The field names are Analista, Produto, Empresa. After adding the record should have to requery the combobox RowSource with: Me.combAnalista.Requery. However, the update on combAnalista does work. I am confused. Okay, understand now. You are using the Caption property in table to show alternate field name for these fields. I never do that.

    This version works. And my error, do not have to use Requery after adding new record, it requeries automatically. I have not used NotInList so was not aware would Requery.

    EDIT: Purpose served, file removed.
    Last edited by June7; 12-26-2011 at 09:27 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #22
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Make a test on the first combo. (FFiltros form. Ignore the other forms. I was auditioning) It is possible to insert a name analyst. (NomeDoAnalista) tAnalista according to the table.
    Where do I enter the code Me.combAnalista.Requery.

    Thank you.

  8. #23
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Perfect.

    Except that when I insert a new analyst, company and product, to make the filter was not to have any record in detail the form. And it's showing. I need to change the SQL of the last combo?

    Thank you.

  9. #24
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Strange did some testing and were showing records of other filters. I did further tests and were not appearing more!
    Good june7 Create a combo box in the detail of the form to enter the name of the person responsible for each step performed at the origin of the line put a query analyst. Only it is not going according to the filter. When I select a name, this is fixed for all. I tried to change the origin of the same line to the 1st combo, but it did not work. You can leave in accordance with the filter, without having to code?
    Thank you again!

  10. #25
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, sorry, I accidentally deleted the code from combProduto AfterUpdate event. An alternative is to set the form's filter:
    Me.FilterOn = False
    Me.Filter = "CodProduto=" & Me.combProduto
    Me.FilterOn = True

    The Combinação218 combobox is not bound. It will show the same value in all 'rows'. Need to bind to field of form RecordSource. What field do you want this value saved to?

    Your latest version does not use the code I developed for adjusting positions of controls. Have you decided not to use it?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #26
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Do not quite understand the last message that came to my e-mail. How is it working now? I did not move in the code?

  12. #27
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Now it is giving the error again. Where do I enter the code you sent me? Preciado delete something?

  13. #28
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Só um momento

  14. #29
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    one moment please

  15. #30
    fabiobarreto10 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    169
    Descupe June7. I'm confused by all the messages. Let's start from scratch. My idea, though you feel crazy, is this: Use the form you sent me and managerial (I can not explain to you), and others use this form to enter records. They are separated bds, but I'll put them in the same db.
    The functionality of a form that you sent me is the following:
    Quickly see only the steps that have been filled, and where the last step of the moment. For when it shows all the steps, with some filled and others not, is not a "vision" very good.
    My initial thought was to add records in combos, and also the steps in the same form (the form you sent me that hides the steps). As if the steps are hidden?
    Put a button called next step, when clicked, would appear the next step that has not been completed and add the records. How would he now records, would not be hidden. This button would appear invisible to click and a new button below to the next step, and so on till the last. The steps that were not to insert records, it was just pushing the buttons go. (Would be very dynamic).
    As this is a bit complex for me, I was thinking of creating this other form (which shows all the steps) to register an analyst, the company and produdo combos, and the steps in the form details.
    The latter form that you send (which shows all the steps) has the same structure as the other (is the same as you sent me earlier).
    Sorry if I can not explain.

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

Similar Threads

  1. Replies: 5
    Last Post: 07-19-2011, 11:56 AM
  2. Field automatically filled
    By Douglasrac in forum Forms
    Replies: 3
    Last Post: 02-15-2011, 11:33 AM
  3. query with fields that cannot be filled in
    By durstlaw in forum Queries
    Replies: 3
    Last Post: 07-23-2010, 12:03 AM
  4. Replies: 2
    Last Post: 03-14-2010, 08:21 AM
  5. Replies: 0
    Last Post: 10-14-2009, 02:44 AM

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