Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 52
  1. #31
    thhui is offline Competent Performer
    Windows XP Access 2002 (version 10.0)
    Join Date
    Feb 2009
    Posts
    235
    You must convert it to access 2000 format
    instead of just renaming your file's extension to mdb.



    See the difference! (Not a true format for access 2000)
    Last edited by thhui; 06-27-2009 at 12:12 AM.

  2. #32
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    it seems that i gave you the wrong one...sorry about that.

  3. #33
    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,917
    I see a control named "Text99" bound to the [Post Number] field, but it is a TextBox and not a ComboBox.

  4. #34
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    here the one i converted to 2000

  5. #35
    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,917
    The name of your field is Post Number, not PostNumber.

  6. #36
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    Quote Originally Posted by RuralGuy View Post
    The name of your field is Post Number, not PostNumber.

    can u help me creating the code 4 that?

    by the way how you find my DB?

  7. #37
    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,917
    Your code is fine, just change the name of the field that you are referencing.

  8. #38
    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,917
    BTW, using IM shorthand is frowned on in these type of forums. Take the time to spell out the words.

  9. #39
    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,917
    Just for the record, if you get the field name wrong but the table name correct in the DCount() function then total number of records in the table is returned, which is why it was always taking that branch in your code. It is just like: DCount([*],"YourTable")

  10. #40
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    Quote Originally Posted by RuralGuy View Post
    Just for the record, if you get the field name wrong but the table name correct in the DCount() function then total number of records in the table is returned, which is why it was always taking that branch in your code. It is just like: DCount([*],"YourTable")

    thanks my friend its working now..i have 2 more fields like this to fix.

    and sorry for my IM words.

    now i get back to work if i get any more problems i come on this post again or create a new one?

    again thanks my friends.

    keep up the good work.

  11. #41
    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,917
    Start a new thread with your next issue. Is this thread ready for the Solved thread tool?

  12. #42
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    Quote Originally Posted by RuralGuy View Post
    Start a new thread with your next issue. Is this thread ready for the Solved thread tool?

    can i hold it for a while lets say until tomorrow morning? that is for me to

    make sure NIN & PassNumber don't give me the same problems?

  13. #43
    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,917
    OK...sure! Take your time.

  14. #44
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    Quote Originally Posted by RuralGuy View Post
    OK...sure! Take your time.

    ok thanks..off i go to make it work.

    again thanks!!!

  15. #45
    islandboy is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    63
    i am back again..this time the problem is with the NIN number...i did make sure i change it..it runs but it doesn't return to the record..it gives me a

    Run-time error '3070':

    The Microsoft Office Access database does not recognize 'N_I_N' as a valid field name or expression.


    the code will work if that field is set to TEXT?

    my field NIN have spaces between N I N

    thanks.

    Code:
    Private Sub N_I_N_AfterUpdate()
       Dim SID As String
       Dim stLinkCriteria As String
       Dim rsc As DAO.Recordset
       Set rsc = Me.RecordsetClone
       SID = Me.N_I_N
       stLinkCriteria = "[N_I_N]=" & SID
       'Check Employee Table table for duplicate
       If DCount("N_I_N", "Employee Table", stLinkCriteria) > 0 Then
          'Undo duplicate entry
          Me.Undo
          'Message box warning of duplication
          MsgBox " Warning N_I_N " _
                 & SID & " has already been entered." _
                 & vbCr & vbCr & "You will now been taken to the record.", _
                 vbInformation, "Duplicate Information"
          'Go to record of original record
          rsc.FindFirst stLinkCriteria
          Me.Bookmark = rsc.Bookmark
       End If
       Set rsc = Nothing
    End Sub

Page 3 of 4 FirstFirst 1234 LastLast
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