Forms :: Show Selected Subform Items In A Table Field

Dec 9, 2013

Given a subform that lists items:

a
b
c
d
e
f
g

Given a table that contains a coverage field

customer coverage
smith a, b, d, g

How would I create a relationship between a subform and a coverage field such that when i multi select items in the subform, it will show what items are selected in the coverage field as in the example.

View Replies


ADVERTISEMENT

Forms :: Right Click Listbox To Copy Selected Items To Temp Table

Mar 7, 2013

I'm trying to create a right-click event on a listbox that will copy selected listbox item(s) to a temp table. So far, I've got this code to acknowledge the right click:

Code:
Private Sub List0_MouseDown(Button As Integer, Shift As Integer, X As Single,
Y As Single)
If Button = acRightButton Then
MsgBox "You pressed the right button."
End If
End Sub

Problem is the selected item on the list box doesn't move until after the mouse down event so whatever code I would run would involve the wrong record(s).

I'm using Access 2000 and 2003. How to get the the correct record selected on mouse down, or point me to a working example of right-click functionality on a listbox.

View 4 Replies View Related

Forms :: Main Form Show Record Selected Within Datasheet Subform

Sep 30, 2013

The situation is i have two forms, looking at the same table, but the main table shows more records, I would like to select a record in the datasheet subform and have the main form flick through to the corresponding record.

View 5 Replies View Related

Forms :: Show All Items On Table For A Particular Key

Oct 29, 2014

I have a form which when displayed shows all the items on the table (usually 1 or 2) for a particular key.

The following row is part filled in awaiting further input for the rest of the fields of that row.

I have a button (exit) which basically closes the form but it also validates the (potentially) partial field ultimate row. If the user hasn't added any data to the partially filled row then I delete that row with this code.....

If IsNull(Me.Field1) or IsNull(Me.field2) Then
....If Not Me.NewRecord Then
........ DoCmd.SetWarnings False
........ strSQL = "DELETE * FROM [Component Swaps] WHERE [ID] =" & [ID]
........DoCmd.RunSQL strSQL
........ Me.Refresh
........ DoCmd.SetWarnings Trye
.... End If

.... DoCmd.Close
.... Exit Sub
End If

This works. I have copied the exact code into the close event for the form but it seems like in that part of the code the previous row is being picked up.

So for example if I have 2 records on the table I display 3 rows (as 1 is created with partial data) thus

ID.....Prefilled Field......Field1......Field2
1......fromrow1............F1...........F2
2......fromrow2............F11..........F22
3......generatedrow3.....NULL........NULL

If the code goes through the exit event then Me.Field1 and Me.Field2 are Null and the record with the ID=3 gets deleted.

Going through effectively the same code for the close event Me.Field1 = "F11" and Me.Field2 = "F22" and the record doesn't get deleted (ID=2 as well)...

View 6 Replies View Related

Forms :: How To Link Combobox Between Form And Subform To Only Show Selected Filtered Data

Apr 1, 2013

I have a suppliers table and a products table. Two forms, Stock form with combobox to list Suppliers and a sub form with combobox that lists Products.I want to select a supplier from the Stock form and then the combobox in the subform to only list products directly sold by the Supplier.Have dabbled in SQL as follows:

SELECT Products.ProductID, Products.ProductName
FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID = Products.SupplierID
WHERE ((Stocksubform.SupplierID=Stock.SupplierID))
ORDER BY Products.ProductName;

View 2 Replies View Related

Reports :: Selected Field From Table Not Show Up When Click View Report?

Aug 30, 2013

I am using access 2007. I click on a table for example. I then click blank report to make a report.

I then insert a text box and then go to control source to select a field from that table. The field doesn't show up when i click view report?

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

Multiple Items Selected From List Box Through A From Not Passes To The Table

Nov 23, 2006

Can some one tell me why, on the attached database example, I can select multiple items from list boxes
"TipoCliente" and "FaixaEt" through "frmClientes" form but they are not passed forward to table "tblClientes" ?

Try to onpen attached database example and use form "fmrClientes" and select multiple items at
"TipoCliente" and "FaixaEt" list boxes by entering them with mouse click and Ctrl key pressed .
Select also single item from
"NivEns" Combobox and write anything on "Nome" and "Apelido" fields .

Go to the table "tblClientes" and you can see text fields "Nome" and "Apelido" and also the item "NivEns" from Combobox "NivEns" are all there but not the items you selected from "TipoCliente" and "FaixaEt" list boxes .

What is happenig ?

Lots of thanlks

Miguel

View 2 Replies View Related

Forms :: Remove Multiple Selected Items From Listbox

Jul 24, 2013

How do I remove multiple selected items from listbox.

Noticed it is a table/query listbox, not value list.

Remove selected.zip

View 1 Replies View Related

Forms :: Count The Number Of Items Selected In Listbox?

Nov 1, 2013

I'm creating an employee audit database, and, in the audit form, the user (ie. supervisor) can select a number of items from a listbox. Each item selected corresponds to an error that the employee has made, and, as such, the employee's Audit Score has two points deducted for each item that is selected.

Incidentally, there are other, solitary elements to the form, but this particular listbox houses a collection of items that are related under a single category.

The score is displayed at the bottom of the form, and it needs to update in real-time.

The problems that I am encountering are that I am unable to count the number of items selected and then I am unable to multiply that count by 2 (the point-value of each item on the list.)

View 2 Replies View Related

Forms :: Search Field - Subform Does Not Change To Show Matching Records

May 6, 2013

All. using 2010. I have a form and a subform. my master and child links are set but when I scroll thru my form; my subform does not change to show the matching records. I do have an unbound search field for the same field as the master and child links. When I type in the search field for a record; the subform does change to that particular record. Do you think that has anything to do with it?

View 1 Replies View Related

Modules & VBA :: Inventory - Show List Of Items That Aren't Already In A Table

Jun 19, 2015

I have a list box that allows multiple selections [Inventory]. I also have a combo box that has multiple selections [Shows].

Right now, user selects from list box and from a combo box and clicks a button. On button click, the items from the list box are associated with the PK from the combo and stored in a junction table. This allows me to quickly associate many inventory items to one show.

I realized that there I currently have no way to prevent duplicate Inventory+show records in the junction table besides having a composite key. This would be fine except no records get inserted into the junction table if there's a duplicate entry.

Ideally, I think that the user should select from the combo box [Shows]. This should narrow down what shows up in the list box [Inventory] in a way that Inventory items already associated with the show are not displayed.

If I have 10 Inventory items and Inventory items 1-5 are already associated with Show 1; after I select the combo box, the list box only displays Inventory items 6-10.

Here's the associated code

Option Compare Database
Option Explicit
Private Sub cmdAddRecords_Click()
Dim strSQL As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim ctl As Control

[Code] ....

View 13 Replies View Related

Add A Value To Same Field For All Items On Subform At Once

Sep 29, 2011

I am using Access 2000 to build a database of car parts, and the cars they are currently installed on. I can assign each item on the "parts" table to a particular car listed on the "cars" table (or to its current location if it is not on a car). I can look at the cars individually, and have a subform that shows the parts currently assigned to that car in a list. That much is great, and is exactly how I want it.

Here is my question:

One of the fields in the "parts" table is "hours." Every time I use a particular car, I would like to increment each of the parts assigned to that car with the hours they were used. Ideally, I would have a form called "Use Vehicle" or similar, and in it I could select the particular car from a dropdown, and a subform would show the particular parts assigned to it. Then, I want to either: a) push a button with a particular time increment (like 0.25 hours) OR b) just enter a value in a box, which would then ADD that number to the "hours" field for every part in the subform.

View 2 Replies View Related

Forms :: Combo Box Not To Show Previous Records Already Selected?

Apr 27, 2014

I have a form that has four combo boxes on it that enable the user to select entrants in a golf tournament for tee off times and tee. (I have attached part of this database to this post) It all works fine but after selecting the first player in the first combo box and then selecting the second combo player I would like the player selected previously not to show up. Is this possible or do I have to rethink the way players are selected.

View 5 Replies View Related

Forms :: Combo Box To Show Report Of Selected Name When Clicked

Jun 7, 2013

Any way, I have created a table "accountstbl" to which i have AccountsID, Accountnumber, Accountname, Accountaddress, Accountcontact fields.

My question is i created a form with a combo box linking it to the accountstbl and Accountname field. When i click on the combo box it lists all my Accountnames from the accountstbl which i want but i want to click on an account name and once selected it will show a report of the selected name.

Reading through lengthy pages there is reference to event procedures but this is code which i do not know.

Simples is me select name from combo box and voila you have a report of your selected account name.

View 6 Replies View Related

Forms :: Store User Name In Table And Show Up In Field

Aug 27, 2014

I managed to count the performance of users. The only thing I need to do is to put the names of the users on the form (under different tab) so I can select them and they show their performance. The best would that they are showing up there in the form till I change the names. I use now a text field to write the name, but when I close the database and open, I need to add the name again.

If I could use somehow the names from the users stored in a table, that would be great.

View 4 Replies View Related

Forms :: Show Table Data Based On Date Field?

Jan 30, 2015

I have a form that each day needs to be filled in by staff of their activities.

By selecting a date, I want to the textbox to display the contents of the comments memo pad field in the table (tblToday...columns are t_date and t_comments).

My very limited access and previous SQL knowledge has eluded me and cannot fathom how to get the text box to show data based on the date selected?

View 9 Replies View Related

Forms :: Sum Line Items From Subform On Main Form

Jul 28, 2013

I have an Orders form (frm-Orders) that includes a subform (frm-Order Details Subform). The subform has line item totals.I want to be able to sum the line item totals and show the result on the main form, but I can't get it to work. Seems like it should be an easy thing to do.

Someone suggested I try this but it didn't work:

In the footer of the subform I created this expression - =SUM([Line Item Total].

Then in the main form I created a textbox with this -- =[Forms]![frm.Orders].[Form]![frm-Order Details Subform].[Form]![txtSum].

View 11 Replies View Related

Forms :: Navigate To New Form From Selected Subform

Feb 6, 2014

I'm new to access and am currently building a simple db customers table and jobs table, I have a setup a relationship between the 2 and have the jobs bt las a sub form of the customer, but only showing a small amount of the job data.

What I would like to do is be able to click on a specific job within the job subform and navigate to that record in the job form where I can see all the data about that job.

View 4 Replies View Related

How To Determine Whether Or Not A Listbox Has Items Selected...?

Oct 6, 2006

Hello.

As my title states, that is my problem! I'm building search criteria from a form and have multiple list boxes... I want to be able to determine whether or not a list box has items selected or not. I have tried as many things as i knew how to with no luck...

Also, i searched the forum but could not find what i was looking for -_-

Thanks for any and all aide!

View 2 Replies View Related

Modules & VBA :: Sum Of Items Selected In A List Box

Sep 10, 2013

how to get the sum of column 2 of a list box total bags is in the second column, i only want the total of bags of the ones selected

I can get the sum of all the boxes but only want highlighted ones

Public Function SumListBox(sForm As String, _
sCtrl As String, iColumn As Integer) As Variant
Dim frm As Form

[Code]....

View 1 Replies View Related

Forms :: Sourcing Data From Subform Selected Record

Apr 24, 2013

I have a main form (frmMain) and a sub form (frmChild), set as datasheet. The first field in the datasheet is set as a hyperlink and opens another form correctly. What I would like is if the user selects a record on frmChild, then a textbox on frmMain is populated by the corresponding value in the second column of the datasheet. Is it possible to do this via vba, and if so, how? I've read about solutions by using continous forms, but I'd like to stay with datasheet format if possible.

View 2 Replies View Related

Forms :: Subform Datasheet Record Selected Display

Dec 2, 2014

In Access 2010, if you have a form with a subform in datasheet view, and you move the focus away from the subform, how can you tell which record(s) on the subform are selected?

When the subform has the focus, the selected row is shown with a blue/grey tint. But as soon as the subform loses the focus, this disappears and all rows look identical.

Its an issue as I have 2 datasheet subforms on my main form, with the 2nd showing records related to the record selected in the 1st. But as soon as the 2nd subform receives the focus, it is impossible to see which record in subform 1 was selected.

I have tried conditional formatting, but that does not work.

View 1 Replies View Related

Recall Selected Items From Listbox Selection

Oct 24, 2005

Hi all, greate site and i have been able to solve most problems by using the search box although this problem is doing my head in...!!

I have a db that records project numbers and their details. I am using a listbox to allow a user to multiselect Project Involvements Tasks(ie Documentation, Build etc) against a project number.

I am able to read the selections into a separtate table with two columns which is structured as:

ProjectNo - InvolvementType
123 - Testing
123 - Build
123 - Documentation
456 - Build
789 - Testing
789 - Documentation

as you can see I dont have a problem getting the Itemsselected into a table... the problem that i am having is getting them out again when the record is displayed - ie marking them as itemsselected.

I believe that the event would be onCurrent which would loop through this table pick up the project number and recorded invovements and mark them as selected in the listbox. if there is no invovement then the listbox would show no selections.

I am using this code to read the selections in

===========================
'Records project involvements against project
Public Function AddInvolvements(ctlRef As ListBox) As String
On Error GoTo Err_AddInvolvements_Click

Dim i As Variant
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim qd As DAO.QueryDef
Dim strDelete As String

Set dbs = CurrentDb
Set qd = dbs.QueryDefs!qInvolvement
Set rs = qd.OpenRecordset

'Delete records where project number exists against an invovelment incase of involvement changes
strDelete = "Delete Project_Involvement.ProjectNo " & _
"FROM Project_Involvement " & _
"WHERE (((Project_Involvement.ProjectNo)=[Forms]![Add_Project_Details]![ProjectNo]));"

DoCmd.SetWarnings False
DoCmd.RunSQL strDelete
DoCmd.SetWarnings True

For Each i In ctlRef.ItemsSelected
rs.AddNew
rs!InvolvementType = ctlRef.ItemData(i)
rs!ProjectNo = Me.ProjectNo.Value
rs.Update
Next i
Set rs = Nothing
Set qd = Nothing

Exit_AddInvolvements_Click:
Exit Function

Err_AddInvolvements_Click:
Select Case Err.Number
Case 3022 'ignore duplicate keys
Resume Next
Case Else
MsgBox Err.Number & "-" & Err.Description
Resume Exit_AddInvolvements_Click
End Select

End Function
===================================

Any help would be much appreciated - also thanks to Pat Hartman for his excellent examples esp http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=54924

Regards
Robert

View 3 Replies View Related

A Tex Box Shoud Disable Once A Certain Dropdrop Items Is Selected

Nov 4, 2004

have a drop down menu on a form. When it has been updated to a certain value I want some of the field on my form to be disabled.

I am thinking it is a afterUpdate event, What would be the code to disable another field on the form

would it be something like this

If Forms![frmPlacements]![CostType] = "consultant" Then Forms![frmPlacements]![Wages].Disabled


CostType is a drop down menu with entry as follow: consultant, permananent, none and when consultant is selected the Wages text box should be disabled

Please look at the following post in a forum

[link]
http://www.access-programmers.co.uk...ead.php?t=75983 [/link]



Thanks

View 3 Replies View Related

Modules & VBA :: Filter Subform Data - Only Show Records Where Field A Is Higher Value Than Field B

Oct 24, 2013

I want to filter my subform data, to only show records where field A is a higher value than field B.

Code:
Me.MySubform.Form.Filter = "A > B"
Me.MySubform.Form.FilterOn = True

This way it doesn't find field B.

Code:
Me.MySubform.Form.Filter = "A > " & MySubform.Form!B
Me.MySubform.Form.FilterOn = True

This way it seems to filter all record to the field B value of the first record.

View 5 Replies View Related







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