Search results

  1. P

    Retrieve the query name for a report

    Is it possible to retrieve the query name for a report? I am trying to create a button in a report and when the button is click, it would provide the name of the query that is behind the report (i.e. the query that is record source for the report). How do I go about in achieving this...
  2. P

    Running query in VBA with where condition

    I have a query set up in Access without any criteria or parameters set. In VBA, I can use DoCmd.OpenQuery to run it. However it doesn't have the parameter to run it with where condition. Whereas DoCmd.OpenReport you can Is there any way to run the query in VBA with where condition? Or is...
  3. P

    Is it possible to have one form but different SQLs to load data?

    Is it possible to have a form that would use different SQL statements to load its data depending on which button the user is used to invoke the form? If so, how to achieve this? I have a form that is used for entering data to the table “Project”. It is also used to display existing data from...
  4. P

    How to avoid #Num! being displayed?

    I have a text box and its control source is an expression as follow: =[txtPrimaryWkpt_area]/[txtNLA] When the value is Null, it is displaying "#Num!" I have tried adding Nz around the expression to become =Nz([txtPrimaryWkpt_area]/[txtNLA], 0) However it makes no differences...
  5. P

    VBA function with nested UPDATE SQL

    When I ran the following function I got the error message “Operation must use an updateable query.”: Public Function UpdProjNLA() NLA_SQL = _ "UPDATE Project " & _ "SET Project.projNLA_area = " & _ "(SELECT Sum(Floor.formalVSml_no * Floor.nla) " & _ "FROM Floor...
  6. P

    How should macro call VBA function and test the return value?

    I have a button with embedded marco (using macro builder). The macro carries out a series of actions/command. One of actions is to call a vba function. The intention is for this vba function to return a value back to the macro which will then carry a series of action based on the returned...
  7. P

    How to stop update to database when moving among tabs in TabControl

    I have a form "Customer Details" with a tab control. The header information in this form is from the Customer table The tab control has 3 tabs. - The 1st and 3rd tabs are also displaying information from the Customer table. - The 2nd tab "Orders" consists of subform "Order Listing". Data...
  8. P

    How to add leading zeros and REFRESH the screen after user tab (or move) out of the f

    Our database has a text field which the user is required to enter a numeric project id via a form. Most of the project id is less than 6 digits long, however we need to add leading zeros to ensure it is stored as 6 digits. How do we add the leading zeros and, more importantly, REFRESH the...
  9. P

    Hello

    Hi, I am new to Access and VBA but have some basic programming skills. I work in a design company and am currently trying to develop, on my own, an application in Access for work. Unfortunately no one at work would be able to give me any technical support or answer any questions I have re...
Back
Top Bottom