Queries :: Populate Text Box Based On 2 List Box Selections

Feb 10, 2014

I have 2 tables.

tblOrderType

1 - Maintenance Order
2 - Breakdown Order
3 - Greasing Order

On my form I have two list boxes: An Order Type List box, and an Area Listbox.What query criteria or VBA code would I use so that I could populate a text box with the relevant order number based on the selections of the list boxes. i.e. MaintenanceOrder & Area Z would display MaintenanceOrderNoZ.

View Replies


ADVERTISEMENT

Forms :: Populate A Table Based On Selections Made Within A Form

Apr 27, 2015

So I'm trying to populate a table based on selections I make within a form.

The form is based of a query that pulls a new product category that needs to be added to my first reference table for products.

The form shows all the new unique product codes, and there is a drop down box with product categories whose source is also the first reference table, so a new code would be:

'JBL - TRX - FVB - TRZ' And based on that new info, I would select from the drop down to select the corresponding category and click 'Add Record' button.

I'm building the event for the button and the code is as follows so far :

Private Sub Add_Record_Click()
End Sub
Private Sub cmbAdd_Record_Click()
'add data to table
CurrentDb.Execute "INSERT INTO tblPVMTable(PVMJoinField, SummaryPVMCategory) " & _

[Code] ....

I keep getting errors with the main portion of code.

Name of table fields :

PVMJoinField
SummaryPVMCategory

Name of Query Fields Populating the Form:

PVM_JOIN_FIELD
cboSummaryPVMCategory

View 4 Replies View Related

Queries :: One Record From Multiple Selections In List Box

Aug 8, 2013

Short Version:

I have a table where one of the fields is a list box, where it is possible to select more than one option. The options correspond to records in another table. I have a query that includes this list box field. The problem is that if someone has made two selections in the list box, the query creates two records, each featuring just one of selections from the list box. Can I get this query to hold the two selections in one record? This might be especially challenging because the query field is pulling attachments.

Long Version:

I have a table [Master List] (primary key is TagNumber), where one of the fields is a list box, [Standard Methods]. You can select multiple choices in this list box, which corresponds to a table also called [Standard Methods]. In the Standard Methods table, there are two fields for naming the method and attaching the PDF which describes the method.

I have a query called [Get Attachments] that is set to bring in different attachment fields from different tables, including [Standard Methods]. The problem is that the query creates a different record for each selection made in the list box. For instance, if you select two standard methods for a certain tag number in the list box, this query will have two records for that tag number, each with one of the method attachments. Is there a way so that the query just creates one record, with both attachments in that record???

It should also be noted that I am using Outer Joins, so that the query includes TagNumber records from the Master List even if there are no attachments for it.

View 1 Replies View Related

Queries :: Copying List Box Selections Into Append Query

Dec 15, 2014

I've got a listbox on one of my forms (with multi select enabled). Essentially its a list of products, the idea is for the user to select as many products as he or she likes, then they click a button and the selected products show up in an append query, which will add records to a table.

How to copy the data from a list box to an append query (nothing that each selection should have its own row)...

i also wanna look into "Select All" and "Select None" buttons, is this possible?

View 4 Replies View Related

Queries :: Form List Based On A Query Returns Original ID Value Not Field Text

Aug 14, 2014

I have a table x where the field value is selected via a combo box in a form that is populated from another table z.

When I look in x, it appears to have correctly stored the text from z, not the ID number.

I then built a Query, qX, which looks in x and grabs the fields I want. That query shows the text correctly in each selected field.

Now when I build a form, frmQx and use a List control, it displays some of the fields as ID values from the original table z, not the text values.

How can I get round this? I've searched and searched for an answer, sigh. Maybe I'm just not quite certain how to phrase the search.

View 5 Replies View Related

Queries :: Deleting Records Based On Selections From Another Table

Apr 1, 2013

I am trying to create a Delete query.

I am trying to delete a specific part from multiple BOMs in my database.

I have a table of the BOMs that I want to look in. I called this table PartTable. I also linked my database table SYSADM.REQUIREMENT which contains all the requirement parts for all of our BOMs.

So I am wanting to delete only part number 123XX from each of the BOMs in my PartTable.

I am able to select the records with:

Code:
SELECT SYSADM_REQUIREMENT.*
FROM SYSADM_REQUIREMENT INNER JOIN PartTable ON SYSADM_REQUIREMENT.WORKORDER_BASE_ID = PartTable.PART_ID
WHERE (((SYSADM_REQUIREMENT.WORKORDER_TYPE)="M") AND ((SYSADM_REQUIREMENT.WORKORDER_BASE_ID)=[PartTable].[PART_ID]) AND ((SYSADM_REQUIREMENT.WORKORDER_LOT_ID)="0") AND ((SYSADM_REQUIREMENT.PART_ID)="123XX"));

Now how do I delete these same records.

I am getting error saying I have to select a table to delete from....

View 11 Replies View Related

Queries :: Calculate Totals Column Based On Check Box Selections

Mar 15, 2013

I'm trying to create a query to work out the total amount to invoice based upon some selections. Currently my query looks at the values in several fields (numberOfRollsUsed etc) by taking the value in these fields and multiplying by a fixed amount to calculate the total.

What I would like to add to the query is fixed values based upon some check box selections. So if check box A is selected, add 5 to the total, is check box B is selected, add a further 10, and so on. All fields and check boxes are held within the same table (Job).

Am I being daft or trying to do something in the worst way possible? I'm actually adding this to an existing system so I don't have so many options to completely redesign the system to calculate this in a better way.

View 2 Replies View Related

Combo Box - Populate List Options Based On Data Already Entered

Mar 6, 2008

Microsoft Access 2003

Novice and working on a project with deadline... please help.


I have a table w a field that I want to convert into a combo bo and use data in the field as the options:


FIELD: Student Status


OPTIONS:
Enrolled
Suspended
Withdrawn


How do I get the combo box to automatically pull the values from that field into the options in the field when u pull down the drop down box?

Am I being clear?

View 2 Replies View Related

General :: Populate A Text Box Based On String

Sep 12, 2014

I have a select query that holds anywhere between 1 to a couple hundred records, I need to take the Name field and populate a textbox which after verification I write to a text file that I later use in a powershell script. So far have tried using VBA to create a variable and populate the textbox based on the string but it only provides me the first item, I've tried dmax and this gives me a single result last Item, Dlookup only gives me the first item, changed it to a listbox which populates the box correctly but only writes the selected item in to my text file.

View 7 Replies View Related

Forms :: Populate Text Box From Table Based On Combo Box Value

Apr 17, 2015

I am trying to populate the text boxes in a form with data from a table based on the selection a user has made in a combobox. I am trying to do this through a DLOOKUP in the text boxes Control Source using the following:

Code:
=DLookUp("[upMobile]","tblRepName","[tblRepName].[repContactMobile] = " & Str([upRepName].[Text]))

in the form when viewing the data.

View 8 Replies View Related

General :: Auto Populate A Text Box Based On Selection Of Combo Box

Jul 24, 2014

I am trying to populate multiple text boxes from combo box using one table. First text box is getting populate on base of combo box value while 2nd text box is not getting populating.

I have used the following to populate the text boxes, even row count is correct, But why is not 2nd text box is not populating ?

=[Combo2].[Column](1)
=[Combo2].[Column](2)

One thing I noted when I provide the control source then selection gets stop from combo box...I am giving the valid control source is customerID but its not working.Could it be the reason ? Why selection gets stop from combo box when provide the control source ? If remove the control source then 1st text box is getting filled on basis of combo selection and 2nd text box value is not getting filled as describe above.

View 1 Replies View Related

Forms :: Auto Populate Text Boxes Based On Value From Combo Box

May 16, 2013

I have a form called frmPO based on a table called tblPO One of the fields in tblPO is linked to the field idAddress in the table tblAddresses

The following fields exist in both tblAddresses and tblPO
Company
Address1
Address2
City
ZP
State

The form contains controls for these fields on tblPO. I would like to give the user the choice to either enter a shipping address manually, or selecting a preregistered address from tblAdresses. For this I would like a combo box showing the values of idAddress. I f a user selects a preregistered shipping address, I would like the form to fill the rest of the fields based on the value of this control.

My understanding is that I should set a BeforeUpdate event to set the values of the different controls, unfortunately my command of VBA amounts to 0.

View 1 Replies View Related

Tables :: Populate Date Based On Specific Text In Another Field

Mar 27, 2013

I would like the "DateOfConfirmation" to populate with today's date when "SSurvDiagThisYear" is Confirmed.

The DateRecordCreated is a simple =Date() that populates when the record is entered into the table.

SSurvDiagThis Year is the case outcome - Pending, Probable, or Confirmed. It is possible that the case could be confirmed on the same day it was entered into the table but that is RARE.

I am hoping for the The DateOfConfirmation to capture the date the case is confirmed so that I can gather some duration between the case being opened to confirmed.

SSurvDiagThisYearDateOfConfirmationDateRecordCreatedIdentificationNoPending12/31/2001269Pending4/1/1999270Confirmed7/29/2001338Pending5/14/2009375Confirmed2/20/2012440Pending3/30/2001543Pending7/1/2000552Confirmed3/30/2001596Pending8/3/2001649Pending6/15/2001672

View 1 Replies View Related

Forms :: Auto Populate A Text Box Based On Selection Of A Combo Box

May 24, 2013

I have two tables: tblWeightTickets and tblWasteType.

I want to create a form: frmWeightTickets, where a user can enter information and the data is stored in tblWeightTickets.

There are two fields in particular that I am working on ... "WasteType" and "Rate".

On the form, I want "WasteType" to be a combobox "cboWasteType" and when I select a type of waste I want the "Rate" textbox on the same form to auto populate with the rate amount for that particular type of waste (i.e. recycling, garbage, etc).

The Rate amount is located in the table: tblWasteType under the field name "Rate". How can I do this and at the same time store the information in the tblWeightTickets? I already have the combo box loaded with the types of waste - I just need it to populate the rate text box and store it in the Weight Tickets table.

View 11 Replies View Related

Forms :: Filter List Box From Other List Box Selections

Jul 15, 2015

I have a form with 2 list boxes, part number and modification. There is a subform containing another list box that is supposed to show the part information (bpn,vendor,status,etc.) that corresponds to the selected part number/modification in the parent form list boxes.

The part info list box has multiselect enabled and what i want to is be able to select multiple line items and press a button which then sets all of the selected line items status to "Request Removal". This is my code for the button:

Private Sub removeButton_Click()
Dim varItem As Variant
With Me.acbModList
For Each varItem In .ItemsSelected
MsgBox (Me.Status.Value & Me.[Part Number].Value)
Me.Status = 6
Next
End With
End Sub

The msgbox was for debugging purposes. Here's my issue; the for each actually does iterate through each selected item but the value for the line item doesn't change along with it. For example, when I selected 3 items, the msgbox will pop up 3 times but each time will have the same information (first item in the table) even when that item isn't selected.

My next issue is that I am receiving an error message with "Me.Status = 6" stating "You cant assign a value to this object". 6 refers to the id of the status i want to set it to.

View 4 Replies View Related

Forms :: Combobox With Three Selections To Auto Populate Textbox

Jun 19, 2013

I would like to create a combobox on a form in which a user has three selections: negative, positive, other.

If negative is chosen a textbox auto-populates with "none detected".
If positive is chosen the text box populates with "positive" and
If other is selected the text box populates with "unspecified".

View 2 Replies View Related

Queries :: Update Table Query Populate Cells Based On IIF Statement?

May 6, 2013

I would like to have a table update query populate cells in a field, based on an IIf statement (below), but states that the IIf statement arguments still need to be enclosed in parentheses. I don't understand what the problem is, I have two sets of opening / closing parentheses.

Code:
IIf IsNull (=Mid( [CONTRACTOR_TASK]![TASK_NAME] ,6,6))

View 3 Replies View Related

Modules & VBA :: Text Box To Become Visible Based On Selected Items From List Box

Oct 13, 2014

I have the code below and am trying to have a form allow Text Box to become visible based on selected items from a List box. Why I am getting the error listed?

Compile Error: Invalid Qualifier

Code:
Private Sub specific_opt_Click()
Dim users As Control
Dim ctrler As String
Dim xx As Long
If Me.specific_opt = True Then GoTo 169

[Code] ....

View 8 Replies View Related

Making Multiple Selections From A List Box (Please Help)

Nov 4, 2004

I had a bigger question earlier and it was answered but I am still having problems with a small part of it. I am trying to track the details of a meeting. who requested it, for what project, date, duration, who attended. I have everything figured out except accounting for who attended the meetings. attendees also called "analysts" have a manay to many relationship with the meetings. Because they can be a part of many meetings and a meeting can have many analysts. So I created a seperate table called MR-Analyst which was supposed to help me track which meetings each analyst attended. I don't know how the data entery form should look like, right now I have everything on it and linked correctly to track everything excep the analysts. how can I create a list box or something that I can select multiple analysts for each meeting and have that recored linked to the MR-Analyst table? Please Help!!!

View 5 Replies View Related

Modules & VBA :: Multiple Selections In List Box

Oct 29, 2013

I have a form called frmNotInvoicedSearch and on that form i have an list box called listCompanyClient populated with our client's names.I then have a command button called cmdOK that brings up a search results form called frmNotInvoicedSearchResults.

Currently i can select one of the records and when i click ok it brings up the search results for that selected record.Is there a way that i can hold in the ctrl and select multiple options and the search results report as such?

View 4 Replies View Related

General :: Multiple Selections In List Box

Dec 4, 2012

Basically I have a list box and I want to be able to pick several items from it (No relation except for the name in the Inital Assigned Field) then hit a button and then it opens another form and shows all the records selected. I want to this to see several records at once but also change the value of all the fields to the same value.

View 1 Replies View Related

Queries :: Creating A List Based On Multiple Queries

Jun 23, 2015

I have 3 select queries which Im trying to output to a combo - Ive tried a UNION query but I get an error

ODBC-- call failed ODBC Driver SQLBase.....

Firstly is do the results need to match within a union query? I mean they have no relationship what so ever Im just trying to populate this combo with the same results.

Secondly is there a better way to do it? 2 of the select queries query a linked SQL table and the third is a local table. All of the select queries work on their own.

View 2 Replies View Related

Running A Query With Multiple Selections From A List Box

Jan 10, 2007

Hello Everyone,
I presently have a form with a list box, I want to be able to select Multiple Items in this list box and then have a query run against a Table based on the items I selected in the List Box. Can you tell me what to do in Query Builder to achieve this?

Thanks

View 1 Replies View Related

Forms :: Query Does Not Show Selections From List Box

Jun 19, 2014

I have a list box (SUB CATEGORY) on my form where I can select multiple items. I have a query (Final) that has this field in it.

Problem - I cannot seem to get the list box selections to appear in the query results. What the "Criteria" should look like or maybe some code that I can try.

View 1 Replies View Related

Save And Retrieve Multiple List-Box Selections In / From One Field

Feb 21, 2005

Hi,
I’m trying to develop a form for coding data from historiocal documents into a dataset. The form is used to avoid errors when converting ‚questions’ in the codebook to the codes for later statistical analysis.
Some questions allow for multiple anwers – but need to be stored to one field in the data-table, separated by semicolon. Ideally I would have a list-box with the questions and write the codes into one field after selection. Another difficulty is, that later the data need to be read from the table and the selections should be visible in the form (if the table contains „1;6“ items 1 and 6 in the listbox should be highlighted).

I’d be grateful for tips or links to relevant sources.
Thanks!

View 2 Replies View Related

Forms :: Limit Number Of Selections In Multiple Value List?

Apr 8, 2013

Is it possible (without using VB) to limit the number of selections a user can make in a multiple value list?

My list is one a form and when in the form field it brings up a total of 15 names with checkboxes, allowing you to "check" each name you want. However, I want to be able to have as many names as I need in the list, but limit the user to selecting only two of them.

View 3 Replies View Related







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