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 673085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:33:23+00:00 2026-05-14T00:33:23+00:00

I have this code, but I have a problem. When I update but do

  • 0

I have this code, but I have a problem.
When I update but do not really made any changes to the value and press the update button, the data becomes null. And it will seem that I deleted the value.

I’ve taught of a solution, that is to add both combobox1.selectedtext and combobox1.selecteditem to the function. But it doesn’t work.

combobox1.selecteditem is working when you try to alter the values when you update. But will save a null value when you don’t alter the values using the combobox

combobox1.selectedtext will save the data into the database even without altering.
But will not save the data if you try to alter it.

-And I incorporated both of them, but still only one is performing, and I think it is the one that I added first:

Dim shikai As New Updater





Try

    shikai.id = TextBox1.Text
    shikai.fname = TextBox2.Text
    shikai.mi = TextBox3.Text
    shikai.lname = TextBox4.Text

    shikai.ad = TextBox5.Text
    shikai.contact = TextBox9.Text

    shikai.year = ComboBox1.SelectedText
    shikai.section = ComboBox2.SelectedText
    shikai.gender = ComboBox3.SelectedText
    shikai.religion = ComboBox4.SelectedText

    shikai.year = ComboBox1.SelectedItem
    shikai.section = ComboBox2.SelectedItem
    shikai.gender = ComboBox3.SelectedItem
    shikai.religion = ComboBox4.SelectedItem


    shikai.bday = TextBox6.Text



    shikai.updates()
    MsgBox("Successfully updated!")

Please help, what would be a simple workaround to solve this problem?

  • 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-05-14T00:33:23+00:00Added an answer on May 14, 2026 at 12:33 am

    a few things to remember —

    1. a ‘selected____’ anything is only non-null when something is, uhm, SELECTED. To ensure that SOMETHING is selected even at start add a line like: ComboBox1.SelectedIndex = 0.

    2. If your recordset has non-string types (like a DATE field might be) then be sure to first check then coerce the string coming back as TEXT to the correct type. I.e….

    if isDate(ComboBox1.SelectedText) then … ‘its ok to use this coerced text.

    1. Since a combobox (as well as a listbox) can hold an entire CLASS (i.e. any kind of OBJECT) … any SelectedItem assignment had better match EXACTLY to the type that was .Items.Add ‘ed originally to the control.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 423k
  • Answers 423k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Remember to take advantage of Boolean short-circuit evaluation: SELECT COUNT(*)… May 15, 2026 at 11:32 am
  • Editorial Team
    Editorial Team added an answer This is basically eaten by a third-party class that I'll… May 15, 2026 at 11:32 am
  • Editorial Team
    Editorial Team added an answer One thing you should try to ensure with any regular… May 15, 2026 at 11:32 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.