Need Help With Allowing Duplicate Selection For Transferring Listboxes

Jul 1, 2006

I found this sample (http://home.earthlink.net/~mgf00/SelectDemo.zip) which allows you to move your selections from one listbox to another with four buttons (<<, <, > and >>) which is just perfect.

Well, almost, actually.

This is already set up to protect against duplicates and that's a good thing. However in my case, my uppers want me to allow duplicates. The code is beyond my ability and my attempts only caused more problems.

The code requires a unique index be generated when the selection is moved between the listbox. Duplicating the index will cause error, and my attempt to circumvent that has either failed totally or is inconsistent (e.g. works if it comes up with a unique value, but will fail if it happens to duplicate a key).

Can anyone show me how I can modify the code to allow for duplicates? The selections then will be looped into a many side table.

View Replies


ADVERTISEMENT

Forms :: Saving Selection From Listboxes To A Query

Aug 20, 2014

I am new to Access and I have get to where the users can make selections in the listboxes, but then I need to save the selection in a query or table to save thier changes.

View 1 Replies View Related

Allowing Duplicate Data In A Query

Jun 13, 2007

I have a database that allows multiple entrys of the same information. I also have a report based on a query that pulls out said data.

I just need my query to pull out every record regardless if it is indentical to a previous one. I found under queries > design > properties there are two options unique values and unique records. According to a source online, these are what control allowing duplicates through, but I have swapped them around with no luck. Currently they are both set to "no".

Is there some other setting I have to switch up in order to allow the duplicates to come through?

Thanks

View 1 Replies View Related

Table Allowing Duplicate Primary Keys

Jun 13, 2013

I've set up a table with 2 primary keys but it is allowing me to input the same combinations twice!

View 4 Replies View Related

Storing Data In Two Fields Without Allowing Duplicate Entries

Mar 19, 2005

I need to know if I can store data in more than one field, without allowing Duplicate entries.

Example: We have to send out letters with a claim number on it, sometimes we need multiple claim numbers on a letter, up to about 10 claim #'s is the most I've seen thus far.

We mail merge into Word to create the letters.

However, these claim numbers cannot be duplicated within the database and in order for this to work with the mail merge, I need several fields to store the claim numbers.

Fields are:
ClaimNumber
ClaimNumber2
ClaimNumber3
etc....

To be more specific. I probably have a bad data structure as I was kind of rushed and a little inexperience with putting the database together. It's for work and sometimes management just doesn't want to wait, they are so negative.

In brief, most everything is in 1 table and I know from reading this forum that I shouldn't do that, but that's another story.

Further, a claim# is tied together by the same claimant, the relationship code is what separates the claimant with the family, the insured id# is used for all claimants within the family.

You can also tie the claim# to a provider id#, some providers such as clinics and large hospitals have multiple providers that use the same provider id#, so a suffix code is used to separate the providers within that same #.

Please feel free to ask additional questions and I will give you the additional information you need to help me. Thanks again.

P.S. - Last year I created the database and this year I am improving it, so expect more posts from me in the future. I really appreciate all the help I get from everyone here!!!!

View 9 Replies View Related

Storing Data In Two Fields Without Allowing Duplicate Entries

Mar 19, 2005

I need to know if I can store data in more than one field, without allowing Duplicate entries.

Example: We have to send out letters with a claim number on it, sometimes we need multiple claim numbers on a letter, up to about 10 claim #'s is the most I've seen thus far.

We mail merge into Word to create the letters.

However, these claim numbers cannot be duplicated within the database and in order for this to work with the mail merge, I need several fields to store the claim numbers.

Fields are:
ClaimNumber
ClaimNumber2
ClaimNumber3
etc....

Any help would be appreciated.

Thanks.

View 3 Replies View Related

Preventing Duplicate Selection Of Combo Box Values

May 5, 2014

I am working on a database to track IT assets with third parties. I have a table called "Equipment" that includes info like model, serial numbers, purchase price, date, location, and "Asset ID". I have a second, single field table called "asset tag" that is just a list of asset ID tags, XYZ1000, XYZ1001, XYZ1002..

I created a one to one relationship between the two tables on the following fields: "equipment.assetID" and "asset tag.asset ID"

Once an "asset ID" is used, I would like it to either be grayed out or disappear from the list of available ID tags. Basically, I want it so that each "asset tag. Asset ID" can only be used once.

View 3 Replies View Related

ListBoxes Again

Mar 5, 2008

Hi,

i am looking for advice on listboxes. i have various books which all happily state everything exept how to use them!!

1st advice-

i need to know how to create an SQL statement on the listbox so it shows filtered dsata from a query. i am trying to filter by date so the list box could show multiple items carried out on the same date. is it:
SELECT Query.Field From Query Where Field

2nd advice-

a listbox shows data based on a query showing payments. i click on the payment in the listbox and a form opens with the specific data showing.
i have looked around but cannot find much on them.

help would be gratefully received as im currently stuck.


thanks,

NS

View 4 Replies View Related

Dynamic Listboxes

Jul 17, 2005

Hello,

I have two tables: Categories and Subcategories.

Categories contains one field: CategoryName
Subcategories contains two fields: ParentCategoryName and SubcategoryName.

In a third talbe I want to select a category from a listbox, then have the subcategory listbox update automatically with the possiblities. Is this possible?

Thanks.

View 1 Replies View Related

Linking 2 Listboxes

Sep 1, 2007

Maybe somebody can help me with this... in my form I have two listboxes, first one to select the name of the client and the second one to select the contact person of the client... both are linked to a seperate table...

first listbox works fine, only the second one gives me troubles... in the source query I link the ClientID to the ID of the first listbox with...

Forms![PRODUCTIONS]![ClientID]

when I run the form, I get all the time a message window on my screen with the text Forms![PRODUCTIONS]![ClientID] and asking a value for it... I think that I do something wrong with getting the ID from the first listbox....

can somebody help me with this what to do ?

View 2 Replies View Related

Populating Listboxes

Feb 11, 2005

Hi,

Trying to populate a listbox using a .txt file created used WORD. This is the code i'm using:

Private Sub cmdDisplayFile_Click()
On Error GoTo text_open_error
Dim sTemp As String
Open "m:myaccessumber.txt" For Input As #1
Do While Not EOF(1)
MsgBox ("in loop")
Line Input #1, sTemp
lstShowTextFile.AddItem sTemp
Loop
Close #1

I'm getting nothing in the ListBox. Any hints would be much appreciated.
text_open_exit:
Exit Sub

text_open_error:
MsgBox Err.Description
Resume text_open_exit

View 2 Replies View Related

Hi! I Need Help With Comboboxes, Listboxes...

Dec 5, 2006

I have a form with many combo and list boxes, but i don't know how to find a relation between them. I want to select a name of a product that is in a combobox and then a list or text box will show its description.... Please help me because I will burn out sooner or later :eek:
KD:confused:

View 12 Replies View Related

Issue About Listboxes!

Oct 27, 2005

Hi
I have an Access form. I have a listbox that has the value pulled from a query. I also have a button on the form. When i click the button, the value from this listbox should be appended to a table. So I am trying to do this by referencing this listbox value as Forms!subform!listbox.value . This is storing the value of null. any idea of how to capture the value that is stored in a listbox.

Thanks
Neelima.

View 3 Replies View Related

Text Align ListBoxes

Jul 20, 2005

Is it possible to align text inside a multi column list box.
For example, currency field is always aligned to the left
where it should be right aligned.

Kappler

View 1 Replies View Related

Viewing Listboxes In A Report

Nov 19, 2005

Good Morning all,

On a Form I have a series of Listboxes, each drills down to a final piece of information. The Listboxes store a number_id which displays along with other information In this case the number_id is associated to a TEXT description. When I send the Listbox info to the Report it displays the info but the text doesn't wrap and it gets cut off. There is no "can grow" option on a list box.

So I need to create a Text Box in the Report but when I refrence the listbox in the control source only the number_id shows up. I need to see the associated text (field).

Any help would be great!

Thanks,

Phil "bones"

View 2 Replies View Related

Multiple Multiselect Listboxes

Feb 18, 2006

Hi, my problems are numerous!
I have a form with a number of multiselect listboxes. Their sources are individual tables such as YEARS, PARISHES, CLIENTS. The underlying data is stored in a separate table. I want users to be able to select none, one or some values from each listbox and run a report.
As simple listboxes with one selection permitted this worked fine. I know that my problem is in concantenating the values.

I have tried attaching some code to the OnClick function of a cmd button on the form. I found this code referred to a number of times here and have tried to adapt it but no luck. I have now reduced my form to one listbox to test stuff out- this is the code-

Dim frm As Form, ctl As Control
Dim varItem As Variant
Dim strSQL As String
Set frm = Form!testform
Set ctl = frm!lboparish
strSQL = "Select * from StJamesAgric where [Parish]="
For Each varItem In ctl.ItemsSelected
strSQL = strSQL & ctl.ItemData(varItem) & " OR [Parish]="
Next varItem

'Trim the end of strSQL
strSQL=left$(strSQL,len(strSQL)-300)

The first error I get is "can't find field 'testform'"

My form is called testform
The listbox is called lboparish
The table with all the data is called StJamesAgric

What am I doing wrong???? And also, if this code EVER works, do I need to repeat it for each listbox or do I insert refernces to each list box within just one subcommand?

Any help greatly appreciated.

Stella

View 5 Replies View Related

Three Listboxes From Same Table Issue

Jun 14, 2006

hi guys, i was wondering if you can help me. I have a data entry form in which the user has three listboxes from an existing table (only one table for the three listboxes). however if the user selects the same item from listbox1 in listbox2 or listbox3, i want him to get an error message and don't let that happen. how can i do this? vba code?:confused:

this is my form:

Please select your three items of choice.

1st choice 2ndchoice 3rdchoice
listbox1 listbox2 listbox3


listbox1.value cannot equal listbox2.value and cannot equal listbox3.value.

View 5 Replies View Related

Scroll Bars In Listboxes

Jan 7, 2005

In the forms that I have made, none of the listboxes ever scroll with the mouse scroll wheel. I have tried to click into the listbox first to ascertain that the focus is in the listbox but nothing works. the only way to scroll is to manually drag the scroll bar tab.
I want to find out how i can make my scrolling work. I guess that there must be a global setting somewhere to switch it on or off... Any insight into this will be highly appreciated!

View 1 Replies View Related

Listboxes In Access For Beginners

Apr 10, 2006

I'm not a programmer by any stretch of the imagination. I'm having an issue I could use a little pro help with.

I have a listbox called "ListDIV" on a form called "fRptCriteria". I am trying to have a query called "qOpenOrds" look to the listbox for some parameters. The field on the query is called "DVNO2Y". The form also contains serveral Calendar Controls "SDate" and "EDate" that the query is looking at too.

In the past, I've had no difficulty referencing a Combo box, but the is listbox issue is driving me nuts!

Thanks in advance.....

View 5 Replies View Related

Search Form With Cbo And Listboxes

Mar 28, 2007

Hello,

I would like to create a search form with four combo and a listbox which would display the result of the combo.

All combos get data from Table1.

I would like to add:
cboSSN
CBOLNAME
CBOFNAME
CBODOB

When users will select a SSN, then CBOLNAME will return all records showing a the same Last Name with data SSN.

If users will select cboLNAME, then CBOFNAME will return all first names of the records with that specific Last name.

Is there a way I can do this or same example? Thanks.

View 1 Replies View Related

Dependent Listboxes With Criteria

Jan 11, 2015

I have a form that has two listboxes. The first list box is named "lstType", which pulls in information from a table tblType. The second or dependent listbox, named lstSName, is then filtered and only shows the SName that match the type. This is pulled in from a table "tblSName." Using the form filtering on the query "[Forms]![frmqryTask]![lstType]"

This portion actually works perfectly and filter my form as I wanted it too (at least originally). However, I realized a few days ago that the when clients or the SName does not have any active projects my company will be working on for them, we don't want don't need to see their name on the forms listbox called "lstSNameand", so we want change a status from "Active" to "Inactive". I've already added this status in as well.

What I'd like to have happen is that when using the dependent listbox, the lstSName will only show those with the "Active" status. I've tried adding the status = active onto the query, however I get a error message saying the query is too complex to run, which I'm guessing has something to do with the "[Forms]![frmqryTask]![lstType]" on the query.

View 9 Replies View Related

Help! Transferring To New Server

Oct 11, 2006

I've been asked to assist a local non-profit transfer an Access DB to a new server. The DB was set up a number of years ago and the designers are no longer available.

The old server is set up as a workgroup server, and the new server is set up as a domain server. (I am completely unfamiliar with how networks are set up...I've never dealt with this end before.)

The designers set up a .mdw file which (I believe) controls permissions etc. After much wrangling, we finally uncovered the admin password. However, even signed in on a workstation as the admin w/ full rights, I still can't copy a functional version of the DB to removable media in order to move it to the new server.

The server does not have MS Access loaded....only the .mdb and .mdw files.

I *think* I have to replace the 'secured' .mdw file with a generic, clean .mdw. Do I need to do this on the server, or the workstations, or both?

What am I doing wrong????

Thanks!

View 1 Replies View Related

Data Not Transferring

Apr 6, 2008

Hi, I'm running 2 append queries to my existing db to update fields in one table with data from 2 sources - basically plucking some fields from one and some from the other (using a client ID number as the common identifier - the data is fed into the parent table). However, it would appear that some of the data is not transferring into the parent table even though it is visible in the source file (.xls). I know that this seems like a broad request but I'm just wondering if there may be a potential simple error. Any ideas?

Cheers....

View 2 Replies View Related

Data Not Transferring

Apr 7, 2008

Hi, I'm running 2 append queries to my existing db to update fields in one table with data from 2 sources - basically plucking some fields from one and some from the other (using a client ID number as the common identifier - the data is fed into the parent table). However, it would appear that some of the data is not transferring into the parent table even though it is visible in the source file (.xls). I know that this seems like a broad request but I'm just wondering if there may be a potential simple error. Any ideas?

Cheers....

View 4 Replies View Related

Forms :: Move Selected Between Two Listboxes?

Dec 16, 2013

Move Selected Items Between Listbox1 (listEmp) and listbox2 (listAllocated). the items moved from listEmp must be removed from listEmp when moved to list allocated and vice versa.

Overview:

listEmp is my first listbox and currently has the query in it's rowsource
SELECT e.* FROM qryEmp AS e;
it has 7 columns but only 6 are showing (Column 1 is hidden)
and it is currently bound to 1

listAllocated has only 4 columns (can be changed) i only need the first 4 columns from the first list.
currently it has no row source and the row source type is set to Value
it is also bound to 1

I did find some code that does not do what I need but is closer than anything that I have found so far. It seems like it is copying the Selected Items from Column 1 and pasting it in the second listbox. but it is pasting them all in a row and not in individual columns below is the code. I will post a screen shot in 2 posts time.

Code:
Private Sub cmdCopyItem_Click()
CopySelected Me
End Sub

[Code].....

View 7 Replies View Related

Modules & VBA :: Using Listboxes To Organize Records

Jun 27, 2014

I have a form with 2 listboxes: 1 to show the name of the products having a code "v" (recordsource query), 1 to show the name of the products having a code "a".

2 arrowed buttons (left-right) would make a product "jump" from one to the other.

The way I wanted to do this is, when the appropriate button is clicked, the actual product code is changed, then the listboxes refreshed, so that it looks that the product jumped listboxes (when the code changes and the listboxes refreshed/requeried, it will disappear in one and appear in the other, because of the recordsource queries).

I want to do it this way, because it is imperative that the code gets changed!

But how to get the record of the selected product "out" of the listbox. When I select a product and check e.g. the ".value" of the listbox, it is "null"!?

So how to "get" the record corresponding with the selected item in a listbox in VBA?

View 7 Replies View Related







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