Solved

Check if all fields in new row are filled (datasheet view)

Posted on 2013-07-01
1
450 Views
Last Modified: 2013-07-01
Hi there

I have a form with datasheet view and I need to make user that user fills in all fields before he moves on to the next row.
Any idea how to catch the moment of moving to another row?
0
Comment
Question by:yahooooo
1 Comment
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39290919
Use the Before Update event of your form.


Private Sub Before_Update(Cancel as Integer)
       if "" & Me.Field1 = ""  OR  "" & Me.Field2 = "" OR "" & Me.Field3 = ""  OR "" & Me.Field4 = "" then
               msgBox "Please enter data in all fields"
               Cancel = True
        end if
end sub

Open in new window

0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now