User Profile

Collapse

Profile Sidebar

Collapse
Dkpitbull
Dkpitbull
Last Activity: May 5 '14, 04:22 PM
Joined: Mar 11 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Dkpitbull
    replied to Using DCount for duplicate records
    Access doesn'it allow it. the code in the compiler turns red..
    Do you think I can use the Dlookup code that I sent you with replacing Dlookup with DCount?
    See more | Go to post

    Leave a comment:


  • Dkpitbull
    replied to Using DCount for duplicate records
    I tried it with space like "Company Name" and hits as an error in the compiler.When I use Dlookup I set it like this:


    Code:
    Private Sub Part_Ref_BeforeUpdate(Cancel As Integer)
    Dim NewCompanyName As String
    Dim stLinkCriteria As String
    NewCompanyName = Me.Company_Name.Value
    stLinkCriteria = "[Company_Name] = " & "'" & NewCompanyName & "'"
    If Me.Company_Name
    ...
    See more | Go to post
    Last edited by Rabbit; Mar 12 '14, 06:03 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Leave a comment:


  • Dkpitbull
    replied to Using DCount for duplicate records
    Hi Seth!
    Thanks for your reply!
    What I get is: 'Run-time error '2465' Microsoft Access can't find the field 'Company_Name'

    In my table the field is 'Company Name'
    I think that I don't define the DCount correctly..
    See more | Go to post

    Leave a comment:


  • Dkpitbull
    started a topic Using DCount for duplicate records

    Using DCount for duplicate records

    Hi guys!
    I'm new in the forum and new Access user as well. I have a form where users can insert new data to a table through it. I kow how how to use Dlookup but not familiar with DCount. I want my vba code to prevent the user of using a combination of values that have already been entered. More specific...

    My table with name "Company" has three columns that I need to check.
    1) column 1 - Company Name
    ...
    See more | Go to post
    Last edited by Rabbit; Mar 12 '14, 06:04 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Working...