Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 68
  1. #31
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    Okay thanks, I was thinking the same thing about the many-to-many relationship but obviously wasn't sure. Does the junction table provide more security to my database in terms of preventing bugs and/or errors?



    Also I was wondering what the message means in the screenshot I posted. I am interpreting that if I choose the first option then Access will also record the information back to my tables as I enter it in the form. And the second option just means to keep it in the form?
    Attached Thumbnails Attached Thumbnails cbow.png  

  2. #32
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I seldom use the wizard to set up combobox so I never thought much about those options. But I think the opposite is the case - first is for an UNBOUND control that is used to input filter criteria, second is to save the value to a field.
    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.

  3. #33
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    Okay thanks. And sorry, is there more security in my db design if I use a junction table for patients and procedures? Have you ever tested or compared the two options?

  4. #34
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I NEVER use multi-value fields because they complicate data manipulation (i.e, building queries) and other issues.

    What security do you mean - data integrity? This can be managed as well with normal tables.
    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.

  5. #35
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    I see, by security I was thinking of any possibilities such as your example, complicating data manipulation in query building, which is the last thing I want. I am trying to make this DB as userfriendly and error free as possible. And I thank you very much for that.

  6. #36
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Multi-value fields are user-friendly but pose issues to the developer.

    Users should not work directly with tables and queries. If they do, then they become developer.
    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. #37
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    Quote Originally Posted by June7 View Post
    Multi-value fields are user-friendly but pose issues to the developer.

    Users should not work directly with tables and queries. If they do, then they become developer.
    Okay but what if I input the records , in tables to create queries that Access can ask the user . For example: a query that will display all the days that a particular procedure was performed in a certain time period ? Or would I have to create a report. Because I know for a fact that this will be needed. Clinicians will need to be able to view how many times a certain procedure was performed in a given time frame

  8. #38
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Review http://www.allenbrowne.com/ser-62.html

    Apply filter to form or to report.
    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.

  9. #39
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    Quote Originally Posted by June7 View Post
    Review http://www.allenbrowne.com/ser-62.html

    Apply filter to form or to report.
    Hey thank you for the great reference to go off of. I finally got back in touch with my laptop... Anyways whilst creating the filter I endure this message when I create a label . (Refer to screenshot)
    Attached Thumbnails Attached Thumbnails label.jpg  

  10. #40
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You mean the 'not associated with a control'. If you don't want to associate the label with a data control, ignore the message.
    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. #41
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    Okay thank you.

  12. #42
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    Hey so I have created the filter and modified the code to my design. Yet when I enter data into the filter nothing comes up, I have entered fake records to test it, but does not work. I was wondering if you'd be able to help? Here is the code:

    Private Sub cmdFilter_Click()


    Dim strWhere As String


    Dim lngLen As Long


    ConstJetDate = "\#mm\/dd\/yyyy#"


    If Not IsNull(Me.txtFilterProcedureName) Then
    strWhere = strWhere & "([lblProcedureName] Like ""*" & Me.txtFilterProcedureName & "*"") AND "

    End If


    If Not IsNull(Me.TxtDateFrom) Then
    strWhere = strWhere & "([lblDate] >= " & Format(Me.TxtDateFrom, conJetDate) & ") AND "
    End If


    If Not IsNull(Me.txtDateTo) Then
    strWhere = strWhere & "([lblDate] < " & Format(Me.txtDateTo + 1, conJetDate) & ") AND "
    End If


    lngLen = Len(strWhere)
    If longLen <= 0 Then
    MsgBox "No Criteria", vbInformation, "Nothing to do."
    Else
    strWhere = Left$(strWhere, lngLen)
    Debug.Print strWhere
    Me.Filter = strWhere
    Me.FilterOn = True
    End If
    End Sub


    Private Sub cmdReset_Click()
    Dim ctl As Control

    For Each ctl In Me.Section(acHeader).Controls
    Select Case ctl.ControlType
    Case acTextBox
    ctl.Value = Null
    End Select
    Next
    Me.FilterOn = False
    End Sub






    Private Sub Form_BeforeInsert(Cancel As Integer)
    Cancel = True
    MsgBox "You cannt add new procedures to the search form.", vbInformation, "Permission denied."
    End Sub






    Private Sub Form_Open(Cancel As Integer)
    Me.Filter = "(False)"
    Me.FilterOn = True
    End Sub

  13. #43
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Please post lengthy code within CODE tags to retain indentation and make it more readable. I can't see anything wrong with it.

    Need to debug. Step debugging is a valuable technique for analyzing code. Review link at bottom of post.
    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.

  14. #44
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    In the sub "cmdFilter_Click()", you are missing a space between the key word "Const" and the constant name, the constant name is missing the prefix "con" and a backslash is missing before the last hash:
    Code:
    ConstJetDate = "\#mm\/dd\/yyyy#"
    should be
    Code:
    Const conJetDate = "\#mm\/dd\/yyyy\#"

    You should have these two lines at the top of EVERY code module:
    Code:
    Option Database
    Option Explicit

    You have this code snippet: (two different variable names)
    Code:
     lngLen = Len(strWhere)
     If longLen <= 0 Then
    and his line should be
    Code:
     lngLen = Len(strWhere) - 5
    You need to remove the last 5 characters of the string: a leading space, the word 'AND' and a trailing space.


    Don't understand what you are trying to do in the sub "Form_Open".
    What is the purpose of this line?
    Code:
      Me.Filter = "(False)"

    To remove the filter, you would use:
    Code:
    Private Sub Form_Open(Cancel As Integer)
      Me.Filter = ""
      Me.FilterOn = FALSE
    End Sub

  15. #45
    Alexieoo is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2015
    Posts
    38
    Greetings,

    Thank you so much for your helpful feedback. The purpose of the lines:
    Me.Filter = "(False)"
    Me.FilterOn = True

    Is to initially show no records upon opening the form

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

Similar Threads

  1. Trend Analysis
    By TimC in forum Queries
    Replies: 2
    Last Post: 01-05-2015, 11:58 AM
  2. Table Analysis
    By Sheba in forum Forms
    Replies: 28
    Last Post: 11-25-2014, 03:26 PM
  3. Cash Flow Analysis
    By cbh35711 in forum Access
    Replies: 15
    Last Post: 09-09-2014, 12:11 PM
  4. Tricky Analysis??
    By stumped in forum Queries
    Replies: 2
    Last Post: 09-13-2012, 01:59 AM
  5. Need Help with Queries-Trade Analysis
    By nybanshee in forum Queries
    Replies: 0
    Last Post: 03-08-2008, 11:50 PM

Tags for this Thread

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