Page 4 of 4 FirstFirst 1234
Results 46 to 52 of 52
  1. #46
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

    You really need to quit using embedded spaces in names. It is causing you no end of grief. What is with the Under_Scores? If your field has embedded spaces then you need to use embedded spaces, just enclose the name in brackets. [N I N]. Much better to not use the embedded spaces in the first place.

  2. #47
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    Quote Originally Posted by RuralGuy View Post
    You really need to quit using embedded spaces in names. It is causing you no end of grief. What is with the Under_Scores? If your field has embedded spaces then you need to use embedded spaces, just enclose the name in brackets. [N I N]. Much better to not use the embedded spaces in the first place.
    i tried to remove the space between the NIN but when i do that it ask me EMPLOYEE TABLE.N I N if i press ok it gives me QUALIFICATIONS AND EDUCATION.N I N
    can you help me on that one?
    thanks

  3. #48
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The [N I N] field is in two tables. Where are you trying to remove the spaces? I would leave it the way it is for now and enclose the name in brackets when you reference it. [N I N]

  4. #49
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    Quote Originally Posted by RuralGuy View Post
    The [N I N] field is in two tables. Where are you trying to remove the spaces? I would leave it the way it is for now and enclose the name in brackets when you reference it. [N I N]

    i think i did something wrong in my DB...can you help me fix..when i take a look at the code i get that N_I_N


    thanks.

  5. #50
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try this one and start a new thread next post.

  6. #51
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63

    Smile

    Quote Originally Posted by RuralGuy View Post
    Try this one and start a new thread next post.

    thanks mate

    since i started using access i got addicted to it but the only problem is the code...i think i need to study more on that.

    again thanks for all your help mate.

  7. #52
    tomk is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2010
    Posts
    5

    check duplicate record using 3 fields

    I am modifying the assets template in ACC 2007 and need to do the same check except I have 3 values that identify a duplicate record. I was able to concatenate the 3 values in txtbox uniqueidcheck for the current entry form, and then do a dlookup of the database in txtbox query_unique. I'm also using the dlookup to bring the ID (Primarykey) into another txtbox called IDLookup.

    What I want to do is:
    1) After they enter the third value, it checks for duplicates.
    2) Prompt to change to the existing record and refresh the whole form from the existing record.



    Private Sub Condition_AfterUpdate()
    Dim intResponse As Integer
    Dim stlinkcriteria As String
    Dim QID As Integer
    Dim rsc As DAO.Recordset
    Set rsc = Me.RecordsetClone
    stlinkcriteria = "[ID]=" & QID
    On Error GoTo Err_Handler
    Forms![asset details]!Query_Unique.Requery
    Forms![asset details]!IDLookup.Requery
    QID = Forms![asset details]!IDLookup
    If Forms![asset details]!Query_Unique = Forms![asset details]! UniqueIDCheck Then
    intResponse = MsgBox("The RMA, Condition and Item already exists." & Chr(13) & "Do you want to switch to the other record?", vbQuestion + vbYesNo)
    If intRespose = vbYes Then
    DoCmd.SetWarnings False
    Me.Undo
    rsc.FindFirst stlinkcriteria
    Me.Bookmark = rsc.Bookmark
    'rsc.SearchForRecord , , acFirst, "[RMA Number] =" & Forms![asset details]!Manufacturer & "AND Condition =" & _
    Forms![asset details]!Condition & "AND ITEM=" & Forms![asset details]!Item

    DoCmd.SetWarnings True

    End If
    Set rsc = Nothing
    End If


    Exit Sub

    Err_Handler:
    MsgBox Err.Description
    Exit Sub
    End Sub
    Last edited by tomk; 06-02-2010 at 04:24 PM. Reason: Trying to delete and start new thread. This thread is solved

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

Similar Threads

  1. If duplicate record, go to original record
    By BigBear in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 02:58 AM
  2. Duplicate record failure
    By bugchaser in forum Access
    Replies: 5
    Last Post: 05-21-2009, 08:38 AM
  3. Replies: 0
    Last Post: 01-06-2009, 02:17 PM
  4. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 12:00 PM
  5. i need record dividers
    By dunston in forum Reports
    Replies: 1
    Last Post: 11-11-2006, 07:57 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