Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    Phoenyxsgirl is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    Joplin, MO
    Posts
    48
    I also tried going back to the original code ..

    Private Sub Combo15_AfterUpdate()
    Dim sAppID As String
    sAppID = Me.Combo15
    Me.AppID.SetFocus
    DoCmd.FindRecord sAppID, acAnywhere, , acSearchAll


    End Sub

    It shows the first line in yellow highlight and it has .SetFocus in blue highlight stating that "Compile Error: Method or Data Member not found"

  2. #17
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Phoenyxsgirl View Post
    I also tried going back to the original code ..

    Private Sub Combo15_AfterUpdate()
    Dim sAppID As String
    sAppID = Me.Combo15
    Me.AppID.SetFocus
    DoCmd.FindRecord sAppID, acAnywhere, , acSearchAll
    End Sub

    It shows the first line in yellow highlight and it has .SetFocus in blue highlight stating that "Compile Error: Method or Data Member not found"
    Can you zip a sample of your db and post it here.

  3. #18
    Phoenyxsgirl is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    Joplin, MO
    Posts
    48
    would it be ok for me to do that without containing the data in it? and how would I do it? lol

  4. #19
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Phoenyxsgirl View Post
    would it be ok for me to do that without containing the data in it? and how would I do it? lol
    No data is fine. You might put in about five "dummy" data so I can use it for test

  5. #20
    Phoenyxsgirl is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    Joplin, MO
    Posts
    48
    I cannot find winzip on this computer. I'm not having the best of luck! Is there any other way I can attach it? its not very big. Only 1.21 MB

  6. #21
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Phoenyxsgirl View Post
    I cannot find winzip on this computer. I'm not having the best of luck! Is there any other way I can attach it? its not very big. Only 1.21 MB
    send it to :
    LEMSystems@yahoo.com

  7. #22
    Phoenyxsgirl is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    Joplin, MO
    Posts
    48
    Thank you. It is sent with a record entered as necessary to show how the data relates.

  8. #23
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Phoenyxsgirl View Post
    Thank you. It is sent with a record entered as necessary to show how the data relates.
    just send the file back to you

    This is the code I placed in the combo box. The combo box is unbound and takes on the Appid list from your table. I created the actuall AppID form in the form. The Appid field is locked. The code is placed in the after update event of the combo box

    Dim sAppID As String
    Dim msgbx As String
    Dim X As Integer
    sAppID = Me.Combo17 'the veriable sAppID takes on the balue from the combo box
    X = DCount("*", "Participants", "appid = '" & sAppID & "'") 'It then checks the table to see if the AppID exist
    If X > 0 Then 'if the AppID exit, then the code runs the "FindRecord" command to find the record associated with the AppId and displays it
    Me.AppID.SetFocus
    DoCmd.FindRecord sAppID, acAnywhere, , acSearchAll
    Else
    'if it does not exist, it will ask whether you want to create a new record with the new AppId
    msgbx = MsgBox("The AppID does not exist. Do you want to create a new record with the AppID?", vbYesNo, "No Record Found")
    If msgbx = vbYes Then 'if you select yes, then the code brings up a new record and inputs the new AppID to the record
    DoCmd.GoToRecord acDataForm, "participants", acNewRec
    Me.AppID.Value = sAppID
    Me.Refresh
    Me.Combo17.Requery 'After the new record is created the code requeries the combo box to add the new appid to the list
    Me.First_Name.SetFocus 'it then set focus in the first field for the user to add the rest of the record
    End If
    End If

  9. #24
    Phoenyxsgirl is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    Joplin, MO
    Posts
    48
    holy cow O.O thank you. I would like to ask you some questions about the code if you don't mind.

    What is the "Me." and what do the ' do throughout the code? I'm assuming they just allow you to enter a description of sorts so that it explains what the code you just typed is doing.

  10. #25
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Phoenyxsgirl View Post
    holy cow O.O thank you. I would like to ask you some questions about the code if you don't mind.

    What is the "Me." and what do the ' do throughout the code? I'm assuming they just allow you to enter a description of sorts so that it explains what the code you just typed is doing.
    The single quote denotes a description. Any words after it will not run as codes. "Me" refers to the current database object. You can only use "Me" if the code is being run in the same form in which the code is contained. If you are running the code from another db object, you would need something like this in place of "Me": "Forms!YourFormName!YourFormObjectName"

  11. #26
    Phoenyxsgirl is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    Joplin, MO
    Posts
    48
    You have no idea how much you have helped! Thank you thank you thank you!!!!

    Now when I try to copy this to the other forms and duplicate it, does it rely on the added text box in the form header? And how does it?

  12. #27
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Phoenyxsgirl View Post
    You have no idea how much you have helped! Thank you thank you thank you!!!!

    Now when I try to copy this to the other forms and duplicate it, does it rely on the added text box in the form header? And how does it?
    I added the AppID to display the actual AppID associated with the record. Whereas the combo box is unbound and is not associated with the actual record. All the combo box do is to hold values for the code. The code sets its focus to the AppID field and use the findrecord funtion to find the AppID that matches the selected AppID.

  13. #28
    Phoenyxsgirl is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    Joplin, MO
    Posts
    48
    Will this work with a subform when I want to edit the subform records but not the original record?

  14. #29
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by Phoenyxsgirl View Post
    Will this work with a subform when I want to edit the subform records but not the original record?
    This will work in a sub form. Just do the same set up in the sub form

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

Similar Threads

  1. Auto-fill
    By sidewayzalex in forum Database Design
    Replies: 49
    Last Post: 09-14-2011, 11:12 AM
  2. can't auto fill
    By chrisrach3 in forum Access
    Replies: 7
    Last Post: 09-12-2011, 04:41 AM
  3. Auto Fill
    By Kerrydunk in forum Forms
    Replies: 16
    Last Post: 04-26-2011, 12:15 AM
  4. Auto-Fill
    By sophiecormier in forum Programming
    Replies: 3
    Last Post: 10-02-2010, 08:29 AM
  5. Auto-fill in datasheet
    By Terence in forum Database Design
    Replies: 2
    Last Post: 03-18-2010, 03:42 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