Create Save button and a Notification to Save a Change

 How to Create a Save button and a Notification to Save a Change  With the bound fields on form, Microsoft Access will automatically save any changes that we update on fields because the control source of data is linked to the field in table. Whether we close the form or move to a new record it will automatically save the changes. In this How To, I will show you a way of creating a notification to save the changes with a Save button. It gives an option to the users…

Read More

How to Create a Random Letter and Number

How to Create a Random Letter and Number Function In this How To, I will demonstrate how to create a random function for alphabets (letter) and numbers. We can use the random string in our program such as to reset a password, create a reference number, create a product ID, etc. I will also show how to mix the random letter and number into a string. The random function will need a built-in Rnd() function which returns a value less than 1 but greater than or equal to zero. The…

Read More

How to Add Item that is not in the list of combo box

How to Add Item not in the List of Combo box A combo box is mostly a list of items linked to table or query. It also can be a list of item that created inside the combo box as a value list. In Access, mostly the item in the combo box is linked to the ID or primary key field of that item from its table. However, the ID field is usually hidden and will display only the second field of the data source of combo box. Also mostly…

Read More

How to Use SQL- WHERE Clause Statement

SQL- WHERE Clause Statement The SQL WHERE CLAUSE Statement is the SQL code that specifies criteria that field values must meet for the records that contain the values to be included in the query results. #1 WHERE Clause and Is Null Set any field to show records where the field value is null value. Syntax: WHERE  fieldName = null Example: Load form with a blank form by using a criteria Customer_ID  is null combining with a Select Statement : Private Sub Form_Load() Dim strTask As String strTask = “SELECT *…

Read More

How to Use SQL- Insert Into Statement

SQL- Insert Into Statement The SQL INSERT INTO Statement is the SQL code that used to insert a new data into table in database. SQL INSERT INTO Syntax INSERT INTO  table_name (fieldName1, fieldName2, fieldName3,…) VALUES(value_for_fieldName1, value_for_fieldName2, value_for_fieldName3,…); SQL INSERT INTO Example The Insert Into command can be put under the click button to add new records into a table. For example below, add a new customer name, Address, City, State from Unbound text boxes on blank form to the tbl_Customer table. Set four Unbound text boxes as following: txtName            …

Read More

How to Use SQL- Update Statement

SQL- Update Statement The SQL Update Statement is the SQL code that used to updatet the existing data in a database. It will be used in combination of other VB code. There are few examples of using the SQL –Update Statement below. SQL UPDATE Syntax Update a specific record in table: UPDATE table_name SET field_name  = some_value WHERE  field_name = some_value;   #1 Update certain Field on Specific Record The Update command can be put under the click button to Update a record that is selected from a List Box.…

Read More

How to Use SQL Delete Statement

SQL- DELETE Statement The SQL Delete Statement is the SQL code that used to delete data from a database. It will be used in combination of other VB code. There are few examples of using the SQL –Delete Statement below. SQL DELETE Syntax Delete a specific record from a table: DELETE * FROM table_name WHERE  column_name = some_value; Delete all records from table/query: DELETE * FROM table_name/query_name;   #1 Delete a Selected Record via ListBox The Delete command can be put under the click button to delete a record that…

Read More