Linking Multiple Items From A Table To One Item In Another In Forms

Mar 4, 2015

I have what should be a really simple database to build. In table tbl1PlanHdr is the header item. Many items in tbl2MaintItem will then be allocated to each header. MaintItems items will be allocated to more than one Header.

I want to set up a form that has the tbl1PlanHdr as the main part of the form and tbl2MaintItem as the subform. Possibly as a datasheet, or continuous form.

I need the ability to update items in the subform back to the orginal table.

I have a relationship of one to many from the tbl1PlanHdr to tbl2MaintItem using the primary key in tbl1PlanHdr.

But should this be a one to many from tbl2MaintItem to tbl1PlanHdr

The end result required is to be able to get a data dump of all the tbl1PlanHdr items with the corresponding tbl2MaintItems items.

View Replies


ADVERTISEMENT

Forms :: Entering One Item To Create Multiple Entries In A Table?

Nov 7, 2014

Basically I am inputting stock into my database so I can have a record of what I have left and who it's gone too. Where I'm stuck though is when I want to add an item that I have more than one off but only enter it once and have it assigned a unique stock ID number (this is in the form of an autonumber) for however much quantity I choose to enter. So for example I have 5 keyboards, I type in 'Keyboard' into my item field (named txtItem) and then type '5' into my quantity field (named txtQuantity). When I then press Add Stock (named btnAddStock) I should then see in the table, 5 separate Keyboards listed each with a different Stock ID number.

View 14 Replies View Related

Customizing Multiple Item Forms

Apr 15, 2014

I am trying to create a form for a query so that I can filter on a chosen record and have the data presented in a more reader friendly format: the idea being that I have the common data show once in the form header and the rest show in the detail section (kind of like a form with subform type)

First I tried using the form wizard to create a Tabular layout form which I could have easily customised, but I am unable to use this because I get an error message telling me the wizard cannot create my form due to me choosing too many fields.

In my next attempt, I elected to use the Multiple Item form option, which seems to work OK but presents the following problems:

1) It has not included all of the data fields in my query... though it looks like I can add these manually
2) I am unable to reorganise the text boxes and labels the way I would like, as they all seem to be locked together Is there a setting somewhere that I can change to stop this from happening?

View 3 Replies View Related

Multiple Item Form From Query To Table?

Jan 14, 2013

I am trying to augment my database to have a price list. Because I wanted the price list to be of record and saved, I used a form with a subform. The main form taking the price list header info price list ID, price area, and date and putting into tblPricelist) and using the sub form to table to load the actual price list info (product, price) and putting into tblpricelistsub.

What I am trying to do is to be able to bring the entire price list as it is and be able to update (or not) the price of all or some of the items and then have it save as a new entry into the tables. I am trying to do this without having to use a sub form and lookup every product all over again (500 products).

Is there a way to do a query to bring up the entire price list, turn that into a form, and then be able to update the prices that would in turn create another entry into the price list and pricelistsub tables?

View 13 Replies View Related

Forms :: Move Multiple Items In A Listbox

Jul 13, 2013

I have a form with a listbox in which users should be able to move the items up and down. The listbox has 4 columns and multiple selection is enabled.

For a NON multiselect box I have it working, and also for a multiple selection box but in that case it works only for one row at a time.

For a NON multiselect listbox:

Code:
cmdDown_Click()
Dim i As Integer
Dim t1 As String, t2 As String, t3 As String, t4 As String
i = selectie.ListIndex
t1 = Nz(selectie.Column(0, i))
t2 = Nz(selectie.Column(1, i))

[Code] ....

You can select an item and then press "Down" as many times as you want to put the items as "down" in the list as you want it to be.

Multiselect listbox

This code also works for a multipleselection listbox when one item is selected, however, after you press "down" the item is still selected (highlighted) as the code reselects is (last line) BUT the value of selectie.listindex apparently is set to "-1".

Pressing "Down" again generates an error (i = -1). I can evade the error by adding "if selectie.listindex <=0 then exit sub", but that doens't fix the problem that the only way I can manage to reset the listindex to the new "position" of the item is to click on it again and THEN press "Down".

To fix this and be able to press "down" multiple times listindex should be set to the new value.

Adding a "me.selectie.listindex = i -1" doens't work (error), it seems like this value is readonly.

I can't find a way to "simulate" a mousepressed selection and really set the listindex.

The other problem is of course that this code doens't support moving multiple items at once: listindex points to the last selected item, but only one.

So, I tried another piece of code to move multiple items, not using listindex (since that resets to -1), but I run into another problem

Code:
Private Sub cmdDown_Click()
Dim var As Variant
Dim i As Integer
Dim n As Integer
Dim t1 As String, t2 As String, t3 As String, t4 As String
n = Me.selectie.ItemsSelected.Count

[Code] ....

The problem with this is: I can select multiple items and press "Down", but the problem now is that the selection is lost as soon as the code removes the first item, and the 2nd loop skips the if selected(i) = true (nothing is selected anymore).
The me.selectie.selected(i+1) = true doens't work since that would only reselect the first item after moving it.

The code "forgets" which items were selected and moves only one item...So I guess I need to put the indexnumbers in memory while moving the items.

I have been searching a lot, but can only find VB-solutions. In VB it's a lot simpeler using f.e. the .list property of a listbox, which is not available in MSAccess

The solution I'm thinking about is:

- set an array with the numbers of selected items
- put indexnumbers of the selected items in the array (f.e. 3 and 4)
- move items based on the indexnumers in the array
- when moving an item update the indexnumber in the array (3>4, 4>5)
- after moving all items reset the selection based on the array

It occurred to me then if I'm going to use an array anyway, I might as well load all items in an array, do the "resorting" and the reload the items in the list from the array. Might be more straightforward?

Btw...It seems VB has a simple solution to moving items: listbox.list(i) = listbox.list(i+1) or something like that moves an item. Even Excel seems to have this property but not MS Access!

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

Retaining Data Items In Previous Entries After Item Has Been Discontinued

Jul 7, 2013

I seem to be have trouble resolving an issue whereby data entered via a combo box based on another combo box from separate tables/queries is not able to be retained when the data in the original table has been "discontinued". The database in question has changing items that are continually updated and/or discontinued. However when these items have been checked as "discontinued", the old entry data is then updated and the fields are empty.

View 1 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 :: Populating Text Box Upon Selecting Multiple Items In Combo Box?

Nov 28, 2014

Now I have a combo box "cbo_items" and a text box "txt_selectedItems", I want to populate text field with items selected from the combo box, every time i select an item it appears in text box and to be separated with comma, so text box appears like this ( item1, item2, item3), and after finishing the whole thing the result appears in lable "lbl_result" as "total items selected: 3 items".

View 1 Replies View Related

Forms :: Filtering Records On Multiple Items Web Form Not Working

Nov 26, 2014

trying to enable database users to filter records based on column names which i have in a combobox. They enter the required value in a textbox and click the "Find" button.The code (linked to button click event) is not throwing any errors but the records are not being filtered.

View 4 Replies View Related

Cascading Combo Boxes - Open A Form And Add Multiple Items To A Table

Mar 12, 2011

I have been trying to modify a sample database to suit what I want to do but I am getting stuck on the very first part cascading combo boxes i want to open a form and add multiple items to a table - first i want to select, from a combo box a department - then select a supplier from all the suppliers/manufacturers related to that department then select a stock item based on the description from all the items available from that supplier

I have attached the database I am using to modify and my database.

View 5 Replies View Related

Help With Linking Multiple Forms

Nov 30, 2005

Hello,

I am using multiple forms to enter some data. When I enter the data in the second form and go back to the main (first) entry form it always goes back to the first record. Also when I am at a record at the first form and go to the second form it always starts at the first record. Is there a way to make the two forms match the record I am entering. I am entering data into the same table. I needed to use two forms because I could not fit all the information on one form. Thanks

View 2 Replies View Related

Forms :: Select Multiple Items By Pasting Comma Separated List

Apr 30, 2015

I have a list with 50 items in it, I would like to select some of these items by pasting in a coma separated list, is this possible?

View 12 Replies View Related

Forms :: Task Storage Database - Form With Multiple Items And Submit Button

Oct 6, 2014

I have this database with the purpose to storage all the tasks that are done in my team. I have a table named Tasks with all their fields. Now, I would like to set a more user friendly way for clients to update this table. I have created another table with a list of most common tasks, so when a client wants to add their tasks list they can choose one of this tasks and add it to the list. I had created a form with multiple items that contains the common tasks and next to each task a button that adds the information they choose into the table "Tasks". This works just fine. However, I would like to add a single button at the top to add all the tasks instead of having to choose one after one.

The "Add All tasks" button has this code:

Private Sub Command79_Click()
Dim valSelect As Variant, MyDB As DAO.Database, MyRS As DAO.Recordset
Set MyDB = CurrentDb()
Set MyRS = MyDB.OpenRecordset("Tasks", dbOpenDynaset)

[Code] ....

View 8 Replies View Related

Forms :: Linking Data Between Multiple Tables / Forms

May 27, 2013

I am a girl guide leader trying to make a faster way to keep track of my unit's completed badge and program work. I have made tables for every area I need (I started with one table but it was too large to change into a form).

In total I have:

- Basic Member table (main information like their name and how many years they have been in, whether they are still in the unit, etc)
- Program area tables
- Interest badge tables

What I want to do is be able to "add/edit" members from the main form, then go to all the sub forms for their program and badge work -- problem is, how to link them!

I am using Access 2007-2010.

View 2 Replies View Related

Forms :: Linking Multiple Tables To A Form?

Aug 26, 2014

problem is that i have 2 tables - Consolidated Orders, Customers.

Customers has 2 fields with a record inside one field with the clients name , but it also has an address in another field in the same table which i want to link to the name of the client because in my invoice i show the companies name and to the left of it i show their address.

i wish to link the two fields together so that when the name shows up, the address of the client will be to the left side .

View 2 Replies View Related

Forms :: Change Backcolor Of A Field On Current Record Displayed In Multiple Items Form

Apr 8, 2013

I wish to change the backcolor of a field on a current record being dispalyed in a 'multiple items' form. However when using me.A.backcolor = makes refrence to all fields called A on the 'multiple items' form and therefore all fields change colour not just the current record.

View 2 Replies View Related

General :: Linking Items Purchased Against Vehicle And Workshops

Dec 4, 2012

I have a database that monitors vehicle maintenance, servicing schedules and stuff like that.

My problem is we purchase items for the vehicles and I am trying to link the items purchased against the vehicles, the purchased items need to show description, cost, invoice number our purchase number, supplier.

The problem comes when we have just stock items recieved that do not have any relation to the vehicles in the main table.

View 1 Replies View Related

Forms :: How To Get Only One Item In A Combo Box When Using Table / Query Option

May 1, 2013

How do I get only one item in a combo box when using the Table/Query option (ie No Duplicates). I want only one of each field with no duplicates.

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

Reports :: Sum Group Items By Specific Item And Hide Details Of Group Summing

May 29, 2015

Despite Google I can't seem to figure this out.

I have some data in a format similar to:

Name / Style / description / speed / distance
john / driver / careful / 80 / 5500
mary / driver / careful / 70 / 7000
pat / racer / reckless / 100 / 6000
anne / driver / careful / 75 / 1000
peter / racer / reckless / 110 / 6500
don / snail / slow / 60 / 6000

I want my report to total by style, without details and to look like:

driver careful 13500
racer reckless 12500
snail slow 6000

How do you get a report to sum the group items by a specific item and to hide the details of that group summing?

View 2 Replies View Related

Forms :: Make A Multiple Item Form / Sign In Sign Out

Jan 8, 2015

My teacher instructs me to make a 'multiple item form' in regards to signing in and signing out of a dentist ( my scenario)...The fields i have are : Appointment ID, dentistID, Appointment time, Appointment Date and customerID..i have created have the multiple item form and i am now displayed with the fields.

View 6 Replies View Related

Forms :: Populate Textbox From Table Field By Clicking Item In Listbox

Aug 28, 2013

I am trying to populate a textbox from a field in a table based on clicking on a item in a listbox. User clicks a name from the Client table in the client field, and the date that is stored in the orderDate in the same row. I want the text11 textbox to show that date.

View 9 Replies View Related

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

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

Linking Table To Forms (Help Needed Please)

Mar 28, 2006

Hi

I am designing a database to store volunteers and what particular function they are volunteering for. I have about 17 areas of volunteering tasks (i.e. Fundraising, Teacher) and at least 3 subcategories for those tasks (i.e. candy fundraisers, nursery school teacher). I want a form that you can enter the volunteer's info and then choose as many areas of interest and as many subcategories. I guess this would be done with checkboxes? Right now I am putting each volunteer task in seperate table (ie. Fundraising table, Teaching Table) and then trying to use combo boxes. But I want the person to be able to choose one or many activities.

Can anyone help me design this or give me a suggestion so that I can query or create a report to list the volunteer and what activities they want to volunteer for. I really appreciate any help I can get at this point. My email is ebbr820@hotmail.com or I will check back on this forum.

Thank You!

View 1 Replies View Related







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