Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7753775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:08:14+00:00 2026-06-01T12:08:14+00:00

Dim CustID As String = txtSrchCustID.Text Dim FirstName As String = txtNewCustFName.Text Dim SecondName

  • 0
    Dim CustID As String = txtSrchCustID.Text
    Dim FirstName As String = txtNewCustFName.Text
    Dim SecondName As String = txtNewCustSName.Text

    If CustID And FirstName And SecondName = "" Then
        MsgBox("Please enter a term to search by")
    EndIf

This returns “Conversion from string “” to type ‘Long’ is not valid.” I was wondering what the error is and how it’s possible to fix it? The other questions that I’ve looked at were mostly to do with variables assigned incorrect types, but I think that isn’t the issue. It occurs when all of the variables are empty.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:08:15+00:00Added an answer on June 1, 2026 at 12:08 pm

    What do you want to do. Do you want to check of all of them are "". Then do this:

    If string.isNullOrEmpty(CustID) and _  
        string.isNullOrEmpty(FirstName) And string.isNullOrEmpty(SecondName) Then
            MsgBox("Please enter a term to search by")
        End If
    

    Or do you want to check if one of them are "". Then do this:

    If string.isNullOrEmpty(CustID) orelse _  
        string.isNullOrEmpty(FirstName) orelse string.isNullOrEmpty(SecondName) Then
            MsgBox("Please enter a term to search by")
        End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dim SecondName As String = SecondNameTxtBox.text() Is the above statement a correct one? Here
Dim loc As String = If txtlocated.Value <> ABC Then loc = txtlocated.Value txtlocated
Dim MyInsert As String = INSERT INTO Inventory(userid, Type,Number) Values( & _ txtEquipCat.text &
Dim value value = CDate(InputBox(Please enter the time (hh:mm), Time Input, FormatDateTime(Now, 4))) '
Dim xbg As Rm xbg.LobId = cmb_lob.SelectedValue xbg.Mobile = mobno.Text xbg.BusinessFax = faxno.Text xbg.BusinessPhone
dim dataType as String toolTip=Marks And Number[String] I want to get the [String] alone.
Dim insert_coupon_query As String = (INSERT INTO qa_discountcoupons (id, status_code) VALUES (AUTO_INCREMENT_ID, 5)) Dim
Consider: Dim line As String Using readFile As New StreamReader(SalesUpdateFile) While (line = readFile.ReadLine)
Dim flag As Boolean = True Dim fileName As String = Path.GetFileName(FileUpload1.PostedFile.FileName) Dim fileExtension
Dim usersInRole As String() = Roles.GetUsersInRole(HR_Base_Role) Dim Myusers As New MembershipUserCollection For Each UserName

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.