VBA form not adding data to the next row in Excel

Yardy

New Member
Joined
Dec 15, 2019
Messages
2
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Please help. I've created a VBA form to collect lead (Pb) data. The form can drop the data into the correct Excel cells but it does not add a new record data to the next available row. VERY FRUSTRATING. The form has three command buttons:
  1. Reset Form - This button works by clearing the form and brings the user back to the first first field on the first page.
  2. Add Record - This button does not work well. Its supposed to add new records to the next row after confirming Yes/No. Instead it keeps overwriting the the previous entry. If the user selects "No" it still makes the entry.
  3. Update Form - With this button I'd like to be able to perform a search function to update records. Search can be either by "Reference Number", "First Name" or "Last Name".
  4. Exit Form - This button works well by exiting the form after confirming "Yes/No". The form naturally exits to the design mode. Is that what is supposed to happen? What is a better suggestion for this action?
Questions:
  1. I can tab from one field to the next but how do I tab from one section of the form to the next?
  2. Security - How do I encrypt the data and create a user login and an administrator login?
  3. Special fields - How do I create formatting for special fields such as "Dates", "Phone", "Email"?
Link

Here's the link to the file
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
2. Add Record - This button does not work well. Its supposed to add new records to the next row after confirming Yes/No. Instead it keeps overwriting the the previous entry. If the user selects "No" it still makes the entry.
You are not adding a record... you are trying to put data into an existing (blank) record. Your table would be easier to work with if it had no blank records and you actually were adding a new record.

Here's a couple of links to sites dealing with tables that will assist you
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top