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 Replies


ADVERTISEMENT

Forms :: Saving List Box Selection Set?

Aug 12, 2013

Is there an easy way to store a multiselect list box selection?

View 1 Replies View Related

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 5 Replies View Related

Forms :: Listboxes With Separate Query In Continuous Form?

Dec 2, 2013

What i wish to do: list activities in a continuous form, and in one column display for each row a listbox which rowsource query is based on another column value from the same row.

I have to admit that the best thing for me would be to be able to create through vba a continuous form... is that possible?

View 3 Replies View Related

Forms :: Saving Specific Data From Data Entry Form Depending On User Selection

Dec 18, 2014

I am trying to save specific data from a data entry form to a specific depending on what the user selects from a dropdown/combo box.

So if the user selects "test company from the combo box, that data (from that form) will save to the Test company data table.

View 5 Replies View Related

Combo Box Selection Not Saving Record

Sep 5, 2005

Good morning all! I've got three bound combos set to visible = false on their property sheetsThese will remain hidden or will be revealed depending on the selection made in another bound combo cmbType.

The select case below works fine on the form but the selection affects all records not just the current record. Open record 1 and select "compliment" from the first combo - the three others correctly stay hidden. Move to record 2 and select complaint and the combos appear - Great! Move back to record 1 and they're showing there as well. Groan. Helllllppp!


Private Sub cmbType_AfterUpdate()
On Error Resume Next

Select Case cmbType.Value
Case "Complaint"
cmb2Day.Visible = True
cmb15Day.Visible = True
cmbOver15.Visible = True

Case "Compliment"
cmb2Day.Visible = False
cmb15Day.Visible = False
cmbOver15.Visible = False

Case "Suggestion"
cmb2Day.Visible = False
cmb15Day.Visible = False
cmbOver15.Visible = False

End Select
End Sub

View 1 Replies View Related

Saving Combo Box Selection To A Table

Oct 4, 2011

I have made a form to enter daily timesheet info for personnel. I have on this form a combo box with different job descriptions, with this info located in a "job description" table. Once all info is entered on this form, I want all info to be entered into my "main time table".

It seemed to be working ok, until I printed out my report based on my main time table. In the area where my job description should be, I don't get the actual wording I had selected from the job description table (using the combo box), only the ID number.steps to have the selected text (from a combo box) saved in the recordset of another table?

View 1 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

Forms :: Move Selected Items To And From Listboxes?

Dec 11, 2013

I have 2 Listboxes the first list is based on a query I need to select items from this box or part of each item and move to another listbox. the items in the second listbox will be used in a report. I have previously posted on another forum with no real luck fyi. the query is put straight in the RowSource.

View 3 Replies View Related

Forms :: Nomination Form - Combobox Selection List Not Updating After Each Selection

Oct 27, 2014

I am designing a nomination form (web database so no vba macros can be used).

The form has 3 combo boxes: cboStaffName, cboLevel, cboNominee.

The form is bound to the tblSubmit table where the submissions are populated.

I used a select statement:SELECT Staff_List.Staff_Name FROM Staff_List; to populate the combo box for the Staff Name selection.

This is the select statement to populate the job level combobox:

SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));

The select statement to populate the combobox for the nominee combobox:

SELECT Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Level)=[forms]![frmtest]![cboLevel]));

The problem is that the staff_name in the first combobox is still found in the nominee combobox which should not be because a staff cannot nominate self. There is a field in the Staff_List called YesNo that should be activated for each staff that is selected so that the select statement on the nominee combobox can be updated accordingly to remove items with the field "Active"

How to get the checkbox selected for each corresponding staff.

Sample of the database has been attached.

View 4 Replies View Related

Forms :: Open A Form For Saving Results Of Query To A Text File On Desktop

May 6, 2015

I have a BE database, that when opened, opens a form for saving the results of a query to a text file on the desktop. It works fine, if the full path is entered.

The problem is, I want this saved on any users' desktop. I did some digging and found the %userprofile% variable, which when used, gives me the error.

I understand this should work in both Windows XP and Windows 7, which are the environments the full DB will operate in. So far the "EXPORT" button on the form has the following for the code:

Code:
Private Sub BTN_Export_Click()
DoCmd.TransferText acExportDelim, , "QRY_ExportPublicComment", "C:UsersMark N. McAllisterDesktopPubComExp.txt"
End Sub

When I tried this:

Code:
Private Sub BTN_Export_Click()
Dim strPath As String
strPath ="%userprofile%desktopPubComExp.txt"
DoCmd.TransferText acExportDelim, , "QRY_ExportPublicComment", strPath
End Sub

the error occurs.

View 10 Replies View Related

Forms :: Combo Box Selection With Multiple Query

Feb 18, 2015

I have created form with multiple tables field in some of these fields I have assigned the combo box selection the total combo boxes in form is four and all are unique numbers but this form is incomplete.

1.When I select or update any of four combo box then remaining combo boxes and fields on form should be updated automatically with related records.

2.I need to bring calculated fields from multiple queries on to my current form .how I can insert query fields in to form...

View 1 Replies View Related

Forms :: Running A Query Based Upon A Listbox Selection?

May 1, 2015

I have a list box that is correctly listing resources from a table (tblResource). I would like to select one of the list box entry and run a query against the tblResource to show the information for that resource in a form. I have tried to use the lstindex with the control (lstResource) in the where clause of a query to accomplish this with no success.

View 5 Replies View Related

Forms :: Selection On Price / Stock And Delivery Time In One Query

Dec 13, 2013

I have a table with following structure :

Fabcode Price Stock Date Supplier

Fabcode : the unique code of the article
Price : the price by this supplier
Stock : quantities for the moment in stock by this supplier
Date : When there is no stock at this supplier, the estimated time of arrival
Supplier : name of the supplier

A selection for looking the lowest price for a supplier who has stock is no problem. But I want also the fastest delivery date when no one has stock.

Example

Fabcode Price Stock Date Supplier
Product1 5 3 A
Product1 6 4 B
Product1 7 5 C
Product1 8 6 D
Product2 14 73 A
Product2 12 56 B
Product2 15 14 C
Product3 30 0 30/12/13 A
Product3 24 0 B
Product3 25 0 26/12/13 C
Product3 32 0 26/12/13 D

Result :
Product1 5 3 A (because supplier A has stock and the lowest price)
Product2 12 56 B (because supplier B has stock and the lowest price)
Product3 25 0 26/12/13 C (because no one has stock, but supplier C has the shortest delivery time AND the lowest price)

Remark 1 : when there is no delivery date (and no stock), this supplier should be ignored for that product
Remark 2 : when no one has stock, the delivery date is priority, when 2 supplies has the same delivery date than the price is priority.

Can this in one query or SQL-statement ?

View 6 Replies View Related

Forms :: Running A Query Based On User Selection Criteria On Form

Jan 9, 2014

I have a form which lets the user enter a contract ID and then a combo box that has a list of reports which run against whichever ID is entered.

What I want to know if I put the ID's in a table if theres a way to allow the user to select multiple ID's in one go and run the report against them the range rather than 1 at time?

I'm thinking about utilising the check/tick boxes would this be possible? or another way?

I'm using 2003 and have some VBA ability.

View 5 Replies View Related

Forms :: Closing All Forms And Saving Records First

Jul 14, 2015

I have had some issues caused by users exiting the database entirely when they realise that they have entered something incorrectly; this in turn has caused problems re-opening the half finished record (the last step of the record creation is to allocate it a unique reference number, which is then used to re-open the record for editing on a point and click form) - now, this is entirely my fault for expecting users to clear up behind them or to exit properly.

So, I am making some changes - when the dashboard form opens it removes the database window close button. I have a separate close button which has the following code:

Code:
Private Sub cmdGoodbye_Click()
Do While Forms.Count > 0
DoCmd.CLOSE acForm, Forms(0).Name, acSaveNo
Loop
DoCmd.Quit
End Sub

However, I would like to add a line to automatically save any records before closing each form - is this possible?

View 7 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

Saving Forms

Feb 24, 2005

I have created Several Forms but I am not able to save any new records in them.
When I click the add new button the records are added alright. but when I exit the form and reopen it all the new data added to the form is lost.
I even tried the save button but that doesnt help.
anyone has ideas what happening here..

Regards
Rahul

View 2 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

Saving Main & Sub Forms

Feb 15, 2005

Hello,

I have an Orders form (frmOrders) which has a subform (frmOrderDetails) detailing the individual order items. For example, there is one order which may consist of many items.

The problem I have experienced is that if someone completes frmOrderDetails first and then moves to frmOrders the records are not saved correctly. I know this is because the main form frmOrders has not been saved or had a field completed which would produce an OrderID which can be linked to frmOrderDetails.

Whilst I could say to users they must complete a certain field first, some will forget and I would like to protect against this.

Whilst the tab order will go to a field on frmOrders, is there a way of forcing users to complete this field before they enter frmOrderDetails.

Alternatively, is there a way of coding a command button to initiatve an OrderID.

Or do you have any other suggestionsm

Thank you.

View 3 Replies View Related

Forms :: Saving Form For Later Use

Aug 14, 2013

I was just wondering if it's possible to save a form with all its settings and selections, and reload it later? So if a user is filling a form out with a few subforms which show a yes/no field in datasheet view, if they select a few options in the yes/no field and hit save, when they reload, it will bring up the form with everything they had selected when they hit save. I'd like to put Save and Load buttons on my form if it's possible.

View 2 Replies View Related

Forms :: Field Not Saving

Dec 29, 2014

On a form there is a sub form.On the form I can only cycle through the records that have been created since the last time the form was opened. I cannot cycle through all records. Is this normal for a form. I assume some code might change this behavior.

More importantly when I look at the sub form in datasheet view I notice the first field of each record is not displayed (saved?) unless it is the very last record created. (This field has a SQL statement as a row source). Is this normal - or are the last 2 paragraphs descriptions of the same thing?

View 2 Replies View Related







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