Results 1 to 3 of 3
  1. #1
    fairyrak is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2016
    Posts
    6

    vba formulas in access

    ithis is a vba formula, but I came to an access calculated field and pasted it and couldn't create it so how do you use vba formulas in access? (and I mean plain access without having to open vba)



    =DCount("[realparent]", "calamus")

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    it's a vba function, not a formula. As you have written it with the = sign, this is how you would enter it in the controlsource of a control on a form or report.

    Or you can use it is a query

    Expr1Count("[realparent]", "calamus")

    I don't know if you can use it in an access web app which does not use vba - I would think you can, but you would have to try.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    Formulas are used in queries, except Dcount. This is used more on a form,or code. And there,i'D use Dcount("*",table).
    The query itself is the count.
    All formulas would be in the query as a new virtual ield.

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

Similar Threads

  1. Access Validation Formulas
    By Dan T in forum Access
    Replies: 1
    Last Post: 09-01-2016, 02:48 AM
  2. Moving Sumif formulas into Access
    By Magnolia1 in forum Access
    Replies: 7
    Last Post: 06-19-2016, 07:56 PM
  3. IF(AND) Formulas for Access
    By harvella in forum Access
    Replies: 3
    Last Post: 05-05-2015, 11:39 PM
  4. calculation formulas in access
    By Hovoruha Octavian in forum Access
    Replies: 1
    Last Post: 03-19-2015, 10:18 AM
  5. Access formulas
    By Joseph Cheong in forum Access
    Replies: 12
    Last Post: 07-25-2014, 10:40 AM

Tags for this Thread

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