473,805 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Clearing listindex value

71 New Member
I've got a form set up that has a series of textboxes to enter employee info, with a listbox at the bottom listing all the employees with their title (to make it easier to find employees to edit information).

I'm having a problem though - if I click around on the listbox to view some employee records, then want to add a new employee, when I click on the add record button it edits the last employee I looked at with the new information. I've added a clear form box, to clear all the textboxes, so that the user can enter info, but it still places the new record over an existing record (the last record looked at with the list box).

Is there a way for me to clear the listindex value (or reset the listbox all together) so that when I enter new info, and click add employee it doesn't overwrite the old employee?
Jul 31 '07 #1
2 5315
rsteph
71 New Member
Any thoughts on this?
Aug 2 '07 #2
JKing
1,206 Recognized Expert Top Contributor
Whats the code behind your add new record button? Am I correct in assuming that you're using a search method under the afterupdate of the list box?
Aug 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2098
by: Pavan Jha | last post by:
Hi, I am using File Input for one of my pages. I have multiple inputs on my page as <INPUT Type=FILE Name=File1> <INPUT Type=FILE Name=File2> and so on... I have a function for validating filetype which is called on onChange
1
4258
by: hortoristic | last post by:
We are using JavaScript to Enable/Disable certain fields on web pages based on business rules. A simple example is if when using an option type tag, and the two options are Yes and No. If YES is selected - enable a field to use the M$ Datepicker. Using the code below works for most of our fields, however the problem is that when the field is re-enabled - it remembers the original date or data prior to it being disabled - despite the...
0
1514
by: Josh Nikle | last post by:
I just realized that I posted this earlier with no title. Sorry. Here's the original post: I have a form with a combo box on it that, when a selection is made, fills in several other controls on the form. The data list for this combo box can be updated via another pop-up form. When I close this pop-up form, I requery the combo box to reflect the addition in the list. Rather than having the user select the name they just added, I'd...
1
1747
by: WEM | last post by:
I filling a combo box with all 50 states and when I select a customer from a list box I want to find the identity(listindex) in the combo box which is the identity stored in the customer record. If I do not sort the states combo box I'm able to find the correct state(listindex) everytime but if I sort the combo box in ascending order it is not finding the correct state(index). I used to do this all the time in VB6 and I'm not sure if it is...
1
8465
by: andrew.panin | last post by:
Hi there! I've got a trouble with these things. What's going on? 1ST STEP: we have ListBox item. Let's call it ListBox1. We're adding four values to it using AddItem method: ListBox1.AddItem('a') ListBox1.AddItem('b') ListBox1.AddItem('c') ListBox1.AddItem('d')
1
1752
by: Vayse | last post by:
I have a databound form, frmClients. One of the field is a combo box, comDepartment, which lets a user select a department for the Client. But I can't figure out how to clear the box. That is, sometimes a Client is dropped by a Department. How would a user clear the combo box so that no Department is selected? With the combo box dropdown style: Dropdown: User must pick from the list, so there is no way of clearing the box Dropdown List:...
3
2604
by: juengelj | last post by:
I need a little advice here... Option Compare Database Global ind As integer Private Sub someobject_on click() ind = 5 End Sub
10
43074
by: Ken OHanlon | last post by:
I have read everything I can find on the internet, BUT it doesn't help! I'm using Windows XP and Access 2003. The following code does increment the listindex as wanted but then after coming back from Private Sub Combo AfterUpdate() zeros it out. You need line one to stop the 7777 error. In addition, line three fires the Private Sub Combo AfterUpdate() which is nice too. 1. On Error Resume Next 2. Me.Combo.Setfocus 3. ...
4
12189
by: juing | last post by:
Hi All, I am very new in the VBA coding and I've noticed this (to me strange) behavior: Assume this code for "Value Items" type of single select two column ListBox: 1) If List98.ListIndex > -1 Then List98.Selected(List98.ListIndex) = False End If 2)
0
9718
marktang
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...
0
9596
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,...
0
10617
Oralloy
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...
1
10370
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7649
isladogs
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...
0
6876
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();...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.