473,382 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Profile selection box

zmbd
5,501 Expert Mod 4TB
Not so much a question as peer review:

I'm looking for an easier way to do this.

The current method I am using works.

I have a form with a combo box, two listboxes, seven command buttons

The form mimics the concept behind the query-wizard- Find Duplicates form where the available fields are listed in one box and the user does the old select and click thing.

In this case, the CBO allows the user to select an available system and in one list box there are available subparts (ones not already assigned) and in the other box the current system profile. I then have a command buttons to move selections right/left or move all right or left between the listboxes. A reset button to restore back to when the system was first selected, save, cancel, done...

The idea is that when assigning inventory to certain systems, the subpart is checked against a system profile before the entry is recorded into the history table assigning it to a given system. (I have to keep a history of where each inventory item is assigned from cradle to grave). [EDIT If the subpart is not part of the system profile, then the user is warned that this part is not allowed to be assigned to that system - supervisors and the DBA can override with their PIN for special cases.]

So this form helps the user easily create and maintain a system profile.

Here's what I have (amongst many other tables):
[tbl_subparts]
[tbl_systems]
[tbl_systemprofile]

[tbl_systemprofile]![PK]
[tbl_systemprofile]![FK_systems]
[tbl_systemprofile]![FK_subparts]

Form with a cbbox based on [tbl_systems] returns [tbl_systems]![PK]
event driven so that:

RS_CP = query([tbl_systemprofile]![FK_systems]= cbbox)
returns [tbl_systemprofile]![FK_subparts] and [tbl_subparts]![partname]


RS_AP = query([tbl_subparts] returns [tbl_subparts]![PK]<>[RS_CP]![FK_subparts])
returns [tbl_subparts]![PK] and [tbl_subparts]![partname]
In human terms, a list from [tbl_subparts] with the primary key and the part's name


lstBx_AP - will have available subparts

lstbx_CP - has the currently assigned subparts

subparts <> inventory

Once the recordsets are available, I then use the additem method to add the RS_AP to lstbx_ap, and of course RS_CP to lstbx_CP by stepping thru the records and additem([field_a],[field_b))

Now those four:
[>>] moves all lstbx_AP to Lstbx_CP
[<<] moves all lstbx_CP to Lstbx_AP
[>] moves (multi)-selected lstbx_AP to Lstbx_CP
[<] moves (multi)-selected lstbx_CP to Lstbx_AP
and logic to (en/dis)-able the save, reset, and sister buttons (nothing in lstbx_AP then [>] is disabled etc)

The save button, that's magic, user has to enter their pin to confirm the change then, I delete the records that have the current system in the profile table and then step thru the lstbx_cp and add new records based on the selected system and the lstbx_cp entry - the reset button is disabled at that point and both RS_CP and RS_AP are re-queried.

Reset, runs the code to read the records from RS_CP and RS_AP back into the list boxes

I think that's it.
Aug 6 '14 #1
3 1168
Rabbit
12,516 Expert Mod 8TB
I think that's how I would have approached this. I don't see anything that's overtly inefficient.
Aug 8 '14 #2
NeoPa
32,556 Expert Mod 16PB
Formulating this into a post for peer review is all you ever needed Z :-D That helps so much with the thinking process. Needless to say I see nothing amiss here. I wouldn't expect to ;-)

PS. Keep good notes of this one for any future requirements of a similar nature. I'm sure you'll be using it again.
Aug 10 '14 #3
zmbd
5,501 Expert Mod 4TB
Sigh... I was so hoping for a more elegant solution :)
Always trying to use that KISS principle(^_^)

Thank You Both for your time.... I also hope that there's enough details for those in a similar state can use this as a framework for their project.
Aug 11 '14 #4

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

Similar topics

1
by: Jean Biver | last post by:
Dear readers: I found a web page with 2 selection lists in a form. The contents of the second selection list are updated based on the entry in the first selection list. For example: if the...
3
by: Rosanne | last post by:
Is there a way to clear the SelectedIndex of a listbox when the browser's back button is clicked? I have a page that contains a server side list box with AutoPostBack = True. When the user...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
1
by: Trevor Bezotte | last post by:
Hi, I'm new to asp.net. I am having trouble updating and displaying a profile property through a dropdownlist. I believe the problem has something to do with autoeventwireup but I'm not sure. If...
0
by: Giorgio | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
15
by: bb nicole | last post by:
The company profile showed blank after user login and click the company profile button. Supposed the company profile should not be blank and will show the company information which call from...
9
by: Kirk | last post by:
I have successfully, implemented a custom Membership Provider to a SQL 2000 table, however, I am having problems doing the same with a Profile Provider. As I understand it, the steps for both of...
0
by: desigeek | last post by:
I have an issue regarding wanting to put a Browse button on web page that will allow a user to select a directory path....not a file.....on their local machine. That selected directory path then...
4
by: Scott M. | last post by:
When profile data is stored in ASP .NET, where is the user data persisted? For how long is it persisted: is it session persisted or permanent (like a cookie)?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.