Add/Remove Records From A List

Jun 2, 2006

(Been a while since I had a question.) I have a table that stores a list of paper forms. the fields are ID#, display name, doccument name, and a code to determine if its a Word or Excel doccument, or an access report. Works fine; the user can click a form name (on the Forms/Reports tab on the main menu form) in a list box, set the # of copies and print the form. There are cases when a group of forms is needed (client admission is one). I have made a group table containing: GrpID, Grp Name, formID. I would like my "Form Group Edit" form to have 2 list boxes; the left one containing the (short) list of available forms; the right one displaying what forms are already (if any) in the selected form group. My idea is to have add/remove controls to manage the right list. I know this "wheel" is already invented and would like to plagerize one that works. Thanks in advance for your help.

View Replies


ADVERTISEMENT

Remove Selection From List Box

Nov 18, 2004

I have an unbound list box that gets its data from a query. I have a button that grabs the selected item(s) from the list box and puts them in a text box. The code for the button is:
Dim nsrow
Dim mystring
Me.List40.SetFocus
If Me.List40.ItemsSelected.Count > 0 Then
For Each nsrow In Me.List40.ItemsSelected
mystring = mystring & Me.List40.Column(2, nsrow) & ", "
Next nsrow
End If
If Right(mystring, 2) = ", " Then
mystring = Left(mystring, Len(mystring) - 2)
Else
End If
DESC = mystring

How do I make it so that when the item is selected and is in the text box, it prevents the user from clicking that same item again from the list box? The best way I think is to remove the item from the List box once it's in the text box but I don't know the code to do it.

Please Help!

View 6 Replies View Related

Remove Names From List Box Upon Selection

May 6, 2005

I have a list box that is filled from a table with names of individuals. What I would like to do is when one of the names is selected it will take it off the list and do this for all the names in the list until all are removed then will reset and have the names avaialble once again. Is this possible and if so how can it be done? Thanks.

View 5 Replies View Related

Forms :: Remove List Item From Combo Box After Use

Sep 1, 2013

Is it possible to remove an list item from a combo box list after it has been used.

What I am trying to do is use a combo box that has a list of questions, after the user selects a question from the combo box list and answers the question when they reselect the combo box that question will not be seen again till the form is reloaded.

View 2 Replies View Related

General :: Remove Customer From List But Keep All Related Info

Sep 26, 2012

Let's say I have a list of customers. For each customer I have much more info on other lists (order list, personal info list, bank info list, and so on) - all are of course connected properly.

Now let's say a certain customer is no longer my customer, so I want to remove him from the customer-list. But, I want to move him to a different list - past-customers - so all the information that was related to that customer will remain so. In short, I want to remove from the customer-list without affecting the related data.

View 4 Replies View Related

Assign Employees To Task Then Remove Employee From List Of Available For Other Tasks

May 6, 2015

I need the ability to assign employees to a different task in each of four different timeslots on a daily basis. What I would like to do is as I assign an employee to a task in timeframe 1, I would like for them to become unavailable to assign to another task in the same timeframe.

For Example: Three employees to assign to three tasks at the 8 AM to 10 AM time slot.

Employee
Task
Time
Assigned

Emp 1, Emp 2, Emp 3
Task 1
8 AM to 10 AM
Emp 2-Task 1

Emp 1, Emp 3
Task 2
8 AM to 10 AM
Emp 3-Task 2

Emp1
Task 3
8 AM to 10 AM
Emp1-Task 3

It would be nice to set this up in a form where my person doing the scheduling can assign an individual to a task and that individual name disappears from the combo boxes, list boxes, or is "greyed-out" in a listing of employees available for the time period for the remaining assignments.

View 7 Replies View Related

Remove 1 Set Of Dup Records

Jul 22, 2005

:confused: I am importing a file from excel into access. The table has about 6300 records. Some records are duplicates or even triplicates. How do I write a querie to leave only 1 of of these records and rmove the duplicates.

Second, I will be importing new files weekly that after I do the above I will need to append to the first table and then remove duplicates. How dod I do this.


thanks

View 5 Replies View Related

Remove Extra Records

Jan 9, 2007

I have a table t1 which contain many records, the field look like:

id f1 f2 f3 ---fn

Id is the primary key
I have some records which have different id but exact the same other fields.
like
id f1 f2 f3 ---fn
87 1 4 6 ---9
12 1 4 6 ---9
18 1 4 6 ---9
116 1 4 6 ---9
1287 1 4 6 ---9
98787 1 4 6 ---9

for those records, I only want to keep one record (any one) and remove all others. How can I do that?

Thanks.

Jeff

View 1 Replies View Related

Remove Duplicate Records

May 1, 2007

Can anyone suggest a way to remove duplicate records.

I've come up with this:
SELECT *, count(*) cnt FROM tableName GROUP BY fieldname1, fieldname2, .... HAVING cnt > 1

But this does not fully resolve my problem.


Thanks.

View 2 Replies View Related

I Need To Remove All Duplicate Records.

Feb 6, 2008

Hi,

I need to remove all duplicate records in a table. These are records that have matching Contract and Order fields. I can't do a DISTINCT query, because that still leaves one record. Thanks.

Michael

View 5 Replies View Related

Remove Null Records From A Query ?

Aug 4, 2005

Hi, I have a query which works perfectly and deletes the unnecessary records according to the criteria i have set , but i dunt want this null values in all column to display in the exported output file. how do i delte the records which are already null .
i tried delete query but it did not work

Please help me

View 1 Replies View Related

Remove Null Records From A Query ?

Aug 4, 2005

Hi, I have a query which works perfectly and deletes the unnecessary records according to the criteria i have set , but i dunt want this null values in all column to display in the exported output file. how do i delete the records which are already null .
i tried delete query but it did not work . This is in microsoft Access.

Please help me

View 3 Replies View Related

Queries :: Return List Of Records From Original List

Apr 23, 2013

I'm looking to move an excel sheet to access because the row counts are too much.The main thing it does is compare the supplied data against a list I hold in the sheet.There are not duplicate records, however..Some data is a direct lookup for a full match, but much of it is a count to see how many records contain a certain string.

I have 500 keywords which have a countif function in using wildcards.I need to create a query/report which will return a list of records from the original list which contains each keyword featured and how many times it features.I was going to do it in PHPmysql but the time it took to parse a million records for every keyword made it pointless.

eg:
keywords:
look
billy
magic

list:
"have a look and see"
"spanish dave"
"who is billy brag"
"looky looky I go hooky"
"who's the man from argentina"
"could it be magic now"

my spreadsheet would return a 1 next to ""billy" and "magic" and would put a 2 next to "look".

the sheet has the keyword in each row and next to the column:
=COUNTIF(list,CONCATENATE("*@",B13))
where "list" is the external data.

View 3 Replies View Related

Remove Link To Related Records In Form

Jan 23, 2006

I have a Datasheet view of a form and it displays a "+" symbol. When expanded it returns a list of related records. How do I get rid of the "+" in my form?

View 8 Replies View Related

Modules & VBA :: Code To Remove Duplicate Records?

Jun 12, 2014

I have a table which has duplicate records so I want to write down the code so that when the user click on a button then it should remove the duplicate records from the table.

View 2 Replies View Related

Queries :: Remove Duplicate Records From Table

Jun 12, 2014

I have a table which has duplicate records so I want to write down the query that will remove the duplicate records from the table.

View 1 Replies View Related

Queries :: How To Remove Duplicate Records From A Query

Feb 11, 2014

I have this small database, I would like to have your support to setup this query "QryResults" in order to remove the duplicate records, I can't find a way to get shown only true records, for some reason I'm getting duplicate rows and fake values, the query is calculating operations from two different queries and a table.

View 3 Replies View Related

Update Related Records And Remove Duplicates

Mar 18, 2014

I have two tables, one is of departments, and one is of people (with a FK denoting what department this person is in). Now consider the fact that there are duplicates in the departments table, and I would like to remove these duplicates. However, the duplicates have related records (in the people table). So, before removing the duplicates, I must update the FKs in the table of people (this is the step I'm having trouble with).

Here's an example:

As you can see, the "Sales" department is there twice. And both have a related record. What I want to do is:
Update all DepartmentIDs (in tblPeople) to not point to duplicate records. In this example, that would be PersonID 2; Joe. His DepartmentID should update to "1" (as both "1" and "2" are "Sales").Delete the duplicates in tblDepartments (in this case, DepartmentID 2, "Sales").

The second step is no problem, it is only the first I am struggling with.

Also, the example posted here is just an example, the data I actually need to do this for is significantly more complex and there are many more records! In the attached database:

qry1: Simple query to find all duplicates (just used the query wizard)
qry2: Just the first row of each duplicated departments (duplicates that shouldn't be deleted). In the example above, this would be the "2", "Sales" row in the tblDepartments table.
qry3: Basically all qry1 rows that don't appear in qry2
qry4: All qry3 values, and their respective qry2 value.

This is what each of the (soon to be deleted) duplicate values' related records' DepartmentID should be updated to... There's no simpler way to phrase that, so using the example above, qry4 would return "2","1". This indicates that all people with a DepartmentID of "2" should be changed to "1" (so we can subsequently erase the department with the ID of 2.

This is as far as I have gotten. My next step is: Update all FKs in tblPeople based on qry4 (You can't set an update query's criteria to pull from another query, nor can you use the second query for the update value... or maybe you can, but I don't know about it).

View 3 Replies View Related

Remove Specific Type Of Attachment From All Records In Table

Jul 20, 2012

I have table call "empTable" and it has an Attachment field called "Attachment". Some of the records has empty Attachment field and some record has one attachment and some has two and the attachment types are jpeg and pdf.

I want to remove all the pdf from all the records in this table automatically with VBA or something, is it possible? How to do it?

View 3 Replies View Related

Forms :: How To Remove Field From Field List

Nov 11, 2014

I had two fields in my table which I previously used in the form. I deleted the fields from the form itself but the fields are still listed under Field List and not even under any table...

Delete buttons doesn't work on it, and neither does backspace?

How do I remove it? Right click only gives me two options:

"Add Field to View" or "Edit Record Source" which returns an error saying this command cannot be used.

View 2 Replies View Related

Query To List Multiple Records In A List From Multiple Queries

Jul 11, 2013

I have a DB where you there's 5 tables all linked together by one project ID

tables below

Project , Staff, Asset, allowances, travel, mark up

What I can do is create a new project, then add records to each of the other tables on what different items I require,

i.e. I create a new project - called project one, in the project table I create a record stating, name, time scale, client and location, then I add different records to each of the other tables on what I require all linked to the same project ID. (probably not explained that too well)

Now I want to create a query that lists all the requirements one after the other this will make it easier to create reports and to calculate costing's.

At the moment I have made 5 different queries listing all the data, then have one report containing 5 sub reports to display the data, no this does work.

View 7 Replies View Related

New Records List

Feb 8, 2005

I'm stuck and have no Idea how to start this, help would be nice

Here is what I am trying to accomplish, I have a Form that I input infromation into several fields (Including the Key field) that will create a new record in my table, Then I click a button on the form and it clears most of the data from the fields and allows me to create a second new record.

What I also want to see is a subform that shows all the new records that were created only while the form was open. Once the form is closed the subform is reset. If I open the form again, the subform will be blank and start listing only the new records i create in that session.

Is this possible? How do I even start this?

Thanks for your help. Please keep in mind this is only the second db i have created and I am not that great at writing code.

View 2 Replies View Related

Many Records To 1 Query List

Nov 30, 2005

I have a table with records Name1, Name2, through Name6 I need to have a query or something that will join all theese records under one list. :confused:

Thank you in advance. :)

Rene

View 1 Replies View Related

Multiple Records From A List Box

May 11, 2005

Ok, I'm sorry if this is somewhere else in the forum, but I can't seem to locate it. Here's my task:

I am writing an attendance program for an Ambulance Company, and I actually have a large chunk of it done. I have a text box for the date and a combo box for the type of activity. I have two side-by-side list boxes that lets the officers select peoples names and put them in the right side list box. The part that I need help with is: How do I add new records to the table that includes each of the members names, but all the same dates and activities.


Ex.:

John Smith 5/10/05 Meeting
Jane Smith 5/10/05 Meeting
Tom Jones 5/10/05 Meeting

I think that i need to write a loop, but my access programming is way out of shape. Any help would be appreciated, ladies and gentlemen

~Damon Vogel

View 4 Replies View Related

Drop Down List Not Getting Records

Feb 4, 2014

If i have a drop down list containing employee type names e.g. Plumber plasterer bricklayer from the employee type table. How would i select the bricklayer and bring back records associated with the selected employee type . I have done a query to go and get the records for the employee type and it works for one employee type.

But I cannot get the button to go and get the records when i select different employee types from the drop down list. I could add loads of buttons with the same query and change the employee type but looks a bit crowded and untidy. Am i missing something simple or is it just complicated.

View 5 Replies View Related

List Box Unbound Records

Aug 18, 2015

I have an unbound listbox and some unbound text boxes.I am attempting to create code that will fill in the text boxes depending on which record I select within the list box.The listbox does not have multi select on, only single select is possible.I found listBox.Value which gives me the primary key which is nice, its something.

I have attempted several ways of things I have found online with no luck on how to get the remaining information into the other text boxes.I have seen a for loop to find the one that is selected then using the listboxControl.Column(intColumn,intRow) but I obviously don't understand how to implement it.The other option is to use a query but I am apparently doing that incorrect as well.The query:

Code:
"SELECT [Student].[firstName] WHERE [Student].[SSID] = studentList.Value;"
I think this is the correct query but I cant seem to implement it either.

I know you don't want people saying "tell me how to do it." So if you have any resources I am good reading up further on it, I just cant find a place that I can get the required info.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved