Hi,
I'm new to visual basic. I have a problem. i connected the database to the form and i added the code below to prompt if there is any blank textbox. When nothing is entered into the textbox and when the first box is left blank, there should be a prompt that says please enter rented videos. However that does not appear and instead there is an error. "Me.Rented_Vide osBindingSource .EndEdit()" is highlighted and a message box appears saying NoNullAllowedEx ception. Please help me. Thanks alot in advance! Smile Smile
This is the program. -
Public Class RentedVideos
-
-
Private Sub Rented_VideosBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rented_VideosBindingNavigatorSaveItem.Click
-
Me.Validate()
-
Me.Rented_VideosBindingSource.EndEdit()
-
Me.TableAdapterManager.UpdateAll(Me.Digital_Video_DatabaseDataSet1)
-
-
If Rented_VideosTextBox.Text = "" Then
-
MessageBox.Show("Please enter rented videos.")
-
ElseIf (Videos_IDTextBox.Text = "") Then
-
MessageBox.Show("Please enter videos ID.")
-
ElseIf (PriceTextBox.Text = "") Then
-
MessageBox.Show("Please enter Price.")
-
ElseIf (Customers_NameTextBox.Text = "") Then
-
MessageBox.Show("Please enter customers name.")
-
ElseIf (Customers_ContactTextBox.Text = "") Then
-
MessageBox.Show("Please enter Customers Contact.")
-
Else
-
Dim RentedVideos As New RentedVideos
-
Rented_VideosTextBox.Text = ""
-
Videos_IDTextBox.Text = ""
-
Customers_NameTextBox.Text = ""
-
MessageBox.Show("Customer Database successfully added.")
-
End If
-
-
End Sub
-
-
Private Sub RentedVideos_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
-
'TODO: This line of code loads data into the 'Digital_Video_DatabaseDataSet.Videos_Titles' table. You can move, or remove it, as needed.
-
Me.Videos_TitlesTableAdapter.Fill(Me.Digital_Video_DatabaseDataSet.Videos_Titles)
-
'TODO: This line of code loads data into the 'Digital_Video_DatabaseDataSet1.Rented_Videos' table. You can move, or remove it, as needed.
-
-
Me.Rented_VideosTableAdapter.Fill(Me.Digital_Video_DatabaseDataSet1.Rented_Videos)
-
-
End Sub
-
4 1119
First I got to get this in before you get yelled at by the moderators to use the [code] Tag on your code so we can help you better. Secondly we can't do stuff for you but your problem is within the scope so please phrase it better. There now you shouldn't get moderator'd. Now as per your problem give me some time and I'll edit this post or Plater or Alias will help you first.
hi,
i'm really quite new to this and i'm not sure how to edit the question which i have currently posted. I'm so sorry that i didn't add the code Tag. I am really new at this and I know this isn't an excuse but i'm sorry if i didn't ask the question right. I tried many ways to solve the problem but i'm still unable to find out what is causing it. It was also very difficult for me to explain the situation as I've just been using Visual Basic for a month.
Hi,
I'm new to visual basic. I have a problem. i connected the database to the form and i added the code below to prompt if there is any blank textbox. When nothing is entered into the textbox and when the first box is left blank, there should be a prompt that says please enter rented videos. However that does not appear and instead there is an error. "Me.Rented_Vide osBindingSource .EndEdit()" is highlighted and a message box appears saying NoNullAllowedEx ception. Please help me. Thanks alot in advance! Smile Smile
Welcome to Bytes!
We appreciate it if you read the Posting Guidelines. This can also be found by clicking the help link near the search at the top of the page. Specifically, we like you to put [code] tags around your code so that it is formatted properly and is easier to read. And as you know, if it is easier to read and understand, it will be easier for the Experts to help you out. Basically, what you can do is paste your code in, highlight it, and click the # button on the text editor.
I edited both of your posts to correct this, and I removed the code from your second post, seeing as it was the same as in the first.
Once again, welcome to Bytes! Enjoy your stay here.
MODERATOR
Thanks for adding the tags
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Nikita A. Visnevski |
last post by:
Hi everyone,
I am rather new to Java beans. Just picked up a book last night and
started reading about them. I am building an application that allows a
user to define objects with dynamic properties. Something similar to a
java hash table. One can add new properties at runtime and remove them
as well.
I have a really fancy third party property inspector available to me
that I would very much like to reuse. This inspector uses...
|
by: Mark |
last post by:
Hi,
For the last 2 years I've been developing vehicle tracking/telemetric
software for a company as a self employed individual. The project is
quiet big, and is going to be there flagship product. Since I had no
other work at the time, I agreed to a low rate when I first started
which was £100 a day. The project started small, so it was only going
to be for a few months, and I badly needed the money. The project soon
balooned into...
|
by: Andrej Hristoliubov |
last post by:
I am the best c++ programmer in the whole wide world. Trust ME!
My reference is Victor Bazarov,Valentin Samko,Alf P.Steinbach( Me and
Alf actually intern together at Microsoft), and Bjarne Stroustrup (he
actually asked me for help to design C++ ; still unsure why he didn't
give me enought credit - probably a poor design choice to have Russian
name near c++),Branimir Maksimovic,Vladimir Kouznetsov . Me and Victor
went to the same...
|
by: Tom |
last post by:
I am looking for some ideas for how to design the layout of the form for
data entry and to display the data for the following situation:
There are many sales associates. A sales associate can work for multiple
companies and work for multiple divisions within each company. Within each
division he can work in multiple departments and within each department he
can work with multiple groups. In each group he works on multiple projects.
All the...
|
by: Chad Z. Hower aka Kudzu |
last post by:
A few of you may recognize me from the recent posts I have made about Indy
<http://www.indyproject.org/indy.html>
Those of you coming to .net from the Delphi world know truly how unique and
"huge" Indy is both as a project, in support, development, and use. But
Indy is new to the .net world.
Indy is a HUGE library implementing over 120 internet protocols and
standards and comes with complete source. Its an open source project, but
not...
| |
by: Brett Baisley |
last post by:
At school, we do all of our coding in emacs, but I am trying to get the
example apps working at home using Visual C++.net.
In the example, there are 4 .cpp files (canvas.cpp, main.cpp, myDisplay.cpp
and tween.cpp) a header file (canvas.h) and a makefile that compiles it for
linux.
The tween.cpp is the main file, and it only contains inludes statements to
the other files.
|
by: Cheryl Langdon |
last post by:
Hello everyone,
This is my first attempt at getting help in this manner. Please
forgive me if this is an inappropriate request.
I suddenly find myself in urgent need of instruction on how to
communicate with a MySQL database table on a web server, from inside
of my company's Access-VBA application. I know VBA pretty well but
have never before needed to do this HTTP/XML/MySQL type functions.
|
by: alvinguy |
last post by:
Hi Guys,
I'm working on a SQL problem and am a bit stuck. I'll have to apologize for I'm still very new to this and can't do a lot of complex queries yet. I've attached what I've done so far, thank you in advance for your help.
Given the following relation schemas:
EMPLOYEE(SSN, NAME, SEX, DNUMBER)
DEPARTMENT(DNUMBER, DNAME, DMGRSSN)
DLOCATION(DNUMBER, DLOCATION)
PROJECT(PNUMBER, PNAME, PLOCATION)
|
by: adam_kroger |
last post by:
BRIEF EXPLANATION:
I have 6 TextBoxes named LIS1, LIS2, LIS3, ... LIS6. I want to be
able to reference them using a For/Next loop and either read ot write
to them. In VBA I would use something like this:
for i = 1 to 6
me.controls("LIS" & i).Value = ""
next i
Nedless to say, the Controls("LIS" & i).text doesn't work...
|
by: Jason Ourscene |
last post by:
Trying to start a project and need a little guidance.
I am completely new to svn and have been programming php for a couple
months now.
Heres where i am at and what i want to do:
1. I am starting a new project and want to use subversion for it.
2. I have subversion installed on my computer at work and at home.
3. I installed a repository for the project on dreamhost under the
domain of the site.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |