Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you handle combo boxes? 2

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
I have a form with GTSNum (an internally generated alphanumeric tracking number for computer equipment).

I want to do two things:

Use a combo box to find a record in the recordset
Give the user the ability to Add/Change GTSNum's.

I am sure many of you have tackled this before. Perhaps hiding a textbox behind a combo and vice versa, depending on certain actions. But this is very troublesome, trying to get it to work from every angle possible.

So I thought about just a EDIT button next to the GTSNum combo so the user could edit that number. But then, how to add a new one? My experience with Limit To List property has not been good, or I don't know how to use it properly.

Thanks for any tips or advice. Sean.
 
Sorry slvrracr, but that's not what I was asking.

I want the user to be able to find records using a cboGTSNum, but also to be able to edit that GTSNum.

Any ideas?

Thanks. Sean.
 
Just use the combo box as you have and put a text box on the form thats also bound to the gtsum field ?
 
So basically you want the user to be able to type in the GST number and it automatically will go to that record right? And you also want to edit the number?? Do you mean edit as in change or edit as in add a new number?

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmmv [pc1][shocked]
 
I wanted to avoid the clutter of a textbox and a combo box.

I want to be able to find a record in a recordset using the combo box. But I also want to be able to edit the values within the combo box...and add a new number if need be.

I thought someone would have some insight for this or tell me how to do my editing from the combo box (I can check for new value in a combo and ask if they would like to add it, but I want to be able to edit too).

My LinitToList experience has not gone well.

Thanks. Sean.
 
The problem we are all having her is understanding why you would ever edit an identifying number like your GSTNum. Isn't that number very specific in identifying the record? Normally you should never change/edit an identifying number for a record.

I can help you with the combobox and selection and adding a new one if necessary using the LimitToList event procedure code. I just need to understand the editing thing with your number.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
How are ya perrymans . . . .

I agree with [blue]scriverb[/blue]. Don't understand it, but I guess you have your reasons (maybe limited space or something). So lets get on with it.

First, your [blue]automation will suffer[/blue] because your gonna have to prompt the user to Find/Edit the CB selection.

Second, your talking and [blue]additional form[/blue] for editing.

If the above conditions are acceptable, then your path for resolution is clear. [purple]The new editing form updates the underlying table and requeries the CB[/purple] (much in the same way the [blue]NotInList[/blue] event does).

Again I stress agreement with [blue]scriverb[/blue]. How dangerous changing what appears to be an extremely important field, is up to you. I would weigh this heavily before making any kind of go decision.

So . . . . . Ya Think?

cal.gif
See Ya! . . . . . .
 
Mind your own business!!!

I'm kidding! I'm kidding! Gotcha for a second there huh?

This number (ex. GTSHCOM010020) signifies the company (GTS), Hardware (H), location (01), serial number (0020).

This is not the primary key of the record because there is so much room for human error. Because of this, I am using an autonumber field instead.

But this field does still provide quick and useful information (there are many types like GTSLOSM and 20 other varieties). Because of the wide variety, it makes automating this number nearly impossible. Perhaps we will eliminate it in the future, and simply use the numerical number of the autonumber for tracking, but everything (IT) is already marked with this system.

I am just trying to prevent using a second textbox for editing and to allow the user to change a value (perhaps because of a typing error). I can use NotInList well to handle new records, but it is the editing I need some advice on.

If you guys can offer any other advice, that is most certainly welcomed as well.

Thanks. Sean.

 
perrymans . . . . You Dog You! ;-)

Since [blue]space is limited[/blue], I would go with the [blue]Find/Edit prompt & Edit form[/blue] (I don't believe your gonna do much better than that unless another tipster can break the ice). This would leave that little bit of space for other important additions, and [purple]this appeals to me[/purple].

Good Luck & Good Hunting . . . . .

cal.gif
See Ya! . . . . . .
 
Fair enough. Thanks for the input.

Last and simple question. How do you make forms pop-up only in the very middle of the screen?

Thanks. Sean.
 
perrymans . . . .

Use the [blue]Pop Up Property[/blue] along with the [blue]Modal Property[/blue] if ya need it. If Modal is "Yes", ya can't set the focus anywhere until you close the Pop Up.

Other properties of interest used with Pop Up are:

Auto Resize
Auto Center
Border Style - usually Dialog or Thin

Cheers! . . . . . . . .

cal.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top