Access VBA check if Query is empty

This Access tutorial explains how to check if table or Query is empty in Access VBA. You may also want to read: Microsoft Access VBA Export all Query to Text File Access VBA check if Query is empty In Access VBA, there are SQL related Functions that simulate SQL. Access DCOUNT Function is one to simulate SQL COUNT. To count the number of records in a Query, we can use * in the first argument of DCOUNT Function. For example, the below VBA counts the number of records in Query1 DC...
Read More

Access SQL SELECT DISTINCT Clause

This Microsoft Access tutorial explains how to use SELECT DISTINCT Clause in Access Query. Microsoft Access SQL SELECT DISTINCT Clause SELECT DISTINCT can be used in Microsoft Access SQL to select unique values in a field. Note that you cannot use this keyword in Query Design View, you can only use it directly in SQL View. The outcome of DISTINCT is exactly the same as GROUP BY if you only try to find the unique values, but GROUP BY can be used together with other Aggregate Functions such a...
Read More

Access VBA NPV Function to calculate Net Present Value

This Access tutorial explains how to use NPV Function in Access VBA to calculate Net Present Value. You may also want to read: Excel NPV Function Net Present Value Net Present Value is to calculate the present value of future cash flow. For example, your client will give you $10000 when the project completes after 1 year, assume there will be inflation, the future $10000 will be less than the present $10000. Assume the inflation is 4%, the present value of $10000 is 10000/(1+4%) = 9615.3...
Read More

SPSS test reliability using Cronbach’s Alpha

This SPSS tutorial explains how to test reliability using Cronbach's Alpha in SPSS. What is reliability and Cronbach's Alpha Reliability means whether the data are consistent using different instruments to measure the data. One example is the questionnaire design, in which more than one questions are asking the same thing but using different wordings. If the answers are inconsistent then the data has low reliability. Cronbach's Alpha is a common measure for reliability and internal consistency...
Read More

SPSS generate random number (decimal and whole number)

This SPSS tutorial explains how to generate random number in SPSS (decimal and whole number). You may also want to read: Excel VBA generate non-duplicated random number Assign unique random number using Excel SPSS generate random number (decimal number) Assume that we have 10 data from 1 to 10.   Navigate to Transform > Compute Variable   On the left hand side, type a name for the Target Variable, which is the new variable that contains the random nu...
Read More

SPSS Simple Random Sampling using Select Cases

This SPSS tutorial explains how to conduct Simple Random Sampling using Select Cases in SPSS. You may also want to read: Excel VBA generate non-duplicated random number Assign unique random number using Excel SPSS Simple Random Sampling In conventional simple random sampling, you need to assign an ascending number to each value of a variable and then generate a random number to help you select the corresponding data. While SPSS can generate random number using Compute Variable, it ...
Read More

SPSS Automatic Recode

This SPSS tutorial explains how to use SPSS Automatic Recode to convert variable from string to number (from Nominal to Scale). SPSS Automatic Recode In SPSS, the ideal data source is to convert all nominal data to numeric data, and then use Value Labels to map the corresponding text, it is because many analysis cannot use nominal data. Automatic Recode is a function to create a new column and automatically convert nominal variable from text to number. It also allows conversion of numeric v...
Read More

Access Report group by date problem

This Access tutorial explains how to group by date (one date for each group) in Access Report and explain the issue. You may also want to read: Access Report keep a group together in one page Access Report group by date problem When you create an Access Report, the default setting isn't group by date. To illustrate, assume that we have an employee database as below. Table1 Hire Date Employee ID 20/12/2016 001 20/12/2016 002 21/12/2016 003 21/12/2016...
Read More

Access first date of month and last date of month

This Access tutorial explains how to find first date of month, last date of month using Access Expression and VBA Function. You may also want to read: Excel first date of month and last date of month Access first date of month To find first date of month in Access, first we have to understand DateSerial, you can use it to combine the year, month and day to a date. Syntax of Date Function DateSerial( year, month, day ) Example Formula Result Explanation DateSerial(2012,1,...
Read More

Get exchange rate using VBA Access Function

This tutorial demonstrates how to create a VBA custom function (UDF) in Microsoft Access in order to get the real time exchange rate. You may also want to read Get Foreign Exchange Rate in Excel Get exchange rate using VBA Access Function Yahoo Finance is designed in the way to facilitate you to get data. You can establish a connection to Yahoo and directly get the exchange rate using User Defined Function. Open Access, press ALT+F11 > Tools > References > enable "Microsoft W...
Read More