Results 1 to 14 of 14
  1. #1
    Jllera is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    32

    Login Form


    Hello, I am trying to run my script for my login form but I am receiving a message telling me that the macros is disable. I have already went into the access options and enabled all macros. I have also created a digital certificate for my database. Any advice?

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    So, you have enabled macros in the trust center?

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If you want to provide db for analysis, follow instructions at bottom of my 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.

  4. #4
    Jllera is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    32
    Quote Originally Posted by burrina View Post
    So, you have enabled macros in the trust center?
    Yes I have.

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Can you post the Macro code? On what form it is used and on what event?

  6. #6
    Jllera is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    32
    I got my script to work, thanks anyway. my issue now is that I need to link my login and password form to open my switchboard form when the users first login. How do I make that happen? Does that have to be part of the script for the login form?

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What do you mean by 'link'? What do you want to happen when the switchboard opens?
    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.

  8. #8
    Jllera is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    32
    So I'm figuring this out as I go along. I've taken care of all my previous issues. I am now trying to create a module that will allow a section on my form to have a list menu with comments and notes from other forms, but I need it to have a time and date stamp as well. If I could paint a picture of what I mean it look like this. I have a form with text box field where information will be inputted into them. In the middle of the form the is a list box that will show prior comments and notes from other forms that have been filled out already. The list box will show the previous comments and notes and have a date and time that they were entered to show the current user when those comments and notes where entered. I hope I explained this correctly. It can be done I've seen on a different program. Just need to figure out how to write the script for mine in access 2007. Please help.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Sorry, does not make sense to me. Comments from what other forms (plural?)? Why a listbox and not a subform?
    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.

  10. #10
    Jllera is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    32
    Quote Originally Posted by June7 View Post
    Sorry, does not make sense to me. Comments from what other forms (plural?)? Why a listbox and not a subform?
    I have three forms that I will need others to interact with. I would like to have one of those forms display in a list box the notes/comments from the other two forms. Why a list box and not a subform? because I would like for the user to be able to scroll through all notes/comments from the other two forms.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Listboxes are not good for displaying very long text strings, like are usually found in a 'notes/comments' field.

    Are these notes/comments all in one table?
    Last edited by June7; 10-24-2014 at 04:20 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.

  12. #12
    Jllera is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    32
    Yes. I created a table just for notes/comments. All three forms are related to that table. What do you recommend? I was given a script to try out Here's what it looks like. Remember this is just a reference. This is not what I've used.

    Public Sub AddNote(ByVal 1AcctID As Long, byVal sText As String, ByVal sUser As String)
    Dim cmd As ADODB.Command

    Set cmd = New ADODB.Command

    On Error GoTo ErrHandler

    With cmd
    .AdctiveConnection = cnMain
    .CommandText = "INSERT Notes VALUES (" & CStr(1AcctID) & ", '" & sText &"', '" & CStr(Now()) & "','" & sUser & "', 0)"
    .Execute
    End With

    GoTo ExitSub
    ErrHandler:
    MsgBox "ERROR ENCOUNTERED" & vbCrLf & Err.Description & vbCrLf & Err.Source, vbCritical, "ERROR"
    ExitSub:
    Set cmd = Nothing
    End Sub

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Might need to specify fields to insert to. At least, I always have.

    INSERT INTO Notes(fieldname1, fieldname2, fieldname3 ) VALUES(

    Why use CStr()? What is 1AcctID? Will need the apostrophe delimiters if going into a text 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.

  14. #14
    Jllera is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    32
    Quote Originally Posted by June7 View Post
    Might need to specify fields to insert to. At least, I always have.

    INSERT INTO Notes(fieldname1, fieldname2, fieldname3 ) VALUES(

    Why use CStr()? What is 1AcctID? Will need the apostrophe delimiters if going into a text field.
    Sweet! Thanks. Not sure why CStr, and I think 1AcctID defines my unique identifier for that table, again, not sure. But as I continue playing with it, I learn more and am starting to get it. (I think) lol.. Again thanks and if I have anymore questions I will definitely hit you back.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-17-2014, 10:23 AM
  2. Login Form
    By bnar in forum Security
    Replies: 11
    Last Post: 07-24-2012, 03:11 AM
  3. Replies: 1
    Last Post: 12-11-2011, 11:48 AM
  4. Login form with nt login
    By hitesh_asrani_j in forum Forms
    Replies: 6
    Last Post: 09-22-2011, 11:43 AM
  5. Login to a form?
    By tandkb in forum Forms
    Replies: 0
    Last Post: 04-25-2011, 06:05 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