Forms :: Arranging Items In A Box

Nov 4, 2013

how to neatly arrange check boxes within a box in a form? They're all scrunched up, what I wanted to do was select size / space and reduce the vertical spacing, but for some reason that's unavailable. If I select stacked it pushes them outside of the box..

View Replies


ADVERTISEMENT

General :: How To Manage Items In Set And Individual Items

Jul 31, 2013

I just want to know how to manage items in set and individual item. Suppose my product list are

individual items = A,B,C,D,E,F,G,H,I,J,K
and 5 pc set = A,B,C,D,F
and 3 pc set = G,H,K

How should I design the table. Previously I designed the table for individual items and whenever orders for set is placed user had to enter individual items with quantity.

E.g. order is for 5 pc set = 3000

A=3000
B=3000
C=3000
D=3000
F=3000

Now I need to just say 5 pc set and it should be automatically populated. And also if order have combination of individual and set items.

View 3 Replies View Related

Forms :: Limit Items In A Combo Box?

Aug 12, 2013

I have a combo box in which I wish to show the Person_ID's of every record in the table TBL_Person, except those which are returned by a separate query. Is this possible at all?

View 1 Replies View Related

Forms :: Moving Items From One List Box To Another

Jul 16, 2015

I have a form where there are 2 list boxes: Part_List and acbPartList. acbPartList has multiselect enabled and what I want to do is be able to select multipler records in that list box and then press a button to add those selected records into the other list box. Here is my code for my button:

Private Sub addItemButton_Click()
Dim varItem As Variant
With Me.acbPartList_Existing
For Each varItem In .ItemsSelected
Me.Part_List.AddItem (varItem)
Next
End With
Me.Part_List.Requery
Me.Refresh
End Sub

I'm not sure if passing varItem is correct, but regardless, it isn't working because Part_List is based off of a query, its not a value list.

View 3 Replies View Related

Forms :: Counting Items In Combo Box

Aug 27, 2013

I have a form that has three cascading combo boxs, plus a subform. The third combo has a list of questions, and you put your answer in the txt box in the subform.

What has to happen is that the combo box has a number of questions and each has to be answered, is there a way to know if all these questions have been answered by knowing what listindex or listcount ect that has be used and to have something set to advise the user that there are more questions and what ones are to be answered.

View 3 Replies View Related

Forms :: How To Exclude Items From A ComboBox

Nov 29, 2013

How do I exclude something from a ComboBox?

My form is a profile of a dog and contains a Dog_ID. The ComboBox is a list of dogs names and shows all the females I want it to show all the females less the female that it is being linked with.

View 1 Replies View Related

Forms :: Combo Box With 3 Items Not Displaying

May 7, 2013

I have two synchronised combo boxes that are working brilliantly except for 1 thing.

The two boxes are Site and Building. I find a site from the Site box dropdown and only the buildings for that site are shown in the Buildings box dropdown. Perfect!

However, I have got 3 fields showing in my Buildings dropdown.

Private Sub cboSite_AfterUpdate()
Me.cboBuilding.RowSource = "SELECT BuildingName, BuildingCode, Status FROM " & _
"BuildingT WHERE SiteID = " & _
Me.cboSite & _
" ORDER BY BuildingName"
Me.cboBuilding = Me.cboBuilding.ItemData(0)
End Sub

that is BuildingName, BuildingCode and Status.

All three show in the dropdown
BUT
only BuildingName shows in the actual Building Box and I would like all 3 to be visible once I have decided on the building name I need!!

Can this be done by changing

Me.cboBuilding = Me.cboBuilding.ItemData(0) (as above)
to
Me.cboBuilding = Me.cboBuilding.ItemData(0), Me.cboBuilding.ItemData(1), Me.cboBuilding.ItemData(2)
or something similar??

Or do I need to create 2 new boxes to return the other values?? I am so close to achieving what I want with this form!!

View 3 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 :: Combo Box Allowing Not In List Items?

Sep 29, 2014

I am using the following code in a textbox (CountryID) to show a country name (CoName) from a table (tblCountry). If the comboBox (cmbCoName) in current form (frmCountry) has no entry then CountryID remains blank, great. If I use the form to add a new entry then CountryID flashes because it does not recognize the entry. Can I use "or" to add another condition in the IIF statement so that it allows the "not in the combobox list" entry?

Code:
=IIf(IsNull([txtCoName]),"",DLookUp("CoName","tblCountry","Country_ID = " & [Forms]![frmCountry]![txtCoName]))

View 2 Replies View Related

Forms :: Selecting Between One And All Items In A Parameter Control?

May 25, 2013

I have a Parameter form which provides various parameters to my queries. The Parameter Form has a Combo box with a list of 50 health facilities which the user can select according to their needs.

There are instances when a user needs data from just one health facility and at times the data is needed for all the 50 health facilities in the district.

How do i address both needs without having to keep adding and deleting the criteria in the underlying queries?

I have added the 'if' condition below in the queries criteria so that if the user does not enter a facility in the combo box, it runs all facilities and if they enter a facility name then the data in the reports is limited to that health facility.

IIf(IsNull([Forms]![Parameter Form]![Combo27]),"",[Forms]![Parameter Form]![Combo27])

It does not work.

Is the expression or VBA code supposed to be entered in the Query or in the Parameter form and how do I make it work?

View 7 Replies View Related

Forms :: Ordering 10 Line Items At A Time

May 22, 2014

How to generate prescription order form, so that I can order 10 line items at a time. I have the following tables,

Suppliers
---------
SupplierID
SupplierName
SupplierContact
SupplierAccount No
SupplierPhone No

Order Form Header
-----------------
SupplierID
SupplierName
SupplierContact
SupplierAccount No
SupplierPhone No
Date

Order Items
-----------
OrderID
ItemID
Item Name
Item Description
Item Size
Item Code
Item Qty

Items
-----
ItemID
Item Name
Item Description
Item Size
Item Code
Item Qty

View 2 Replies View Related

Forms :: Data Entry Items Only If Previous Has Value

Mar 7, 2013

I'm creating user form items (text boxes/combo boxes) for a user to enter data in. In this case it would be for a part. What I would like to happen is, if there is more than 1 part, then after the first part is entered, another part entry item is added below the first one but only if the first one has a value - for a virtually unlimited amount of parts. BUT if there is only say, one part to be entered, then the next section of selection appears directly below the blank next part. Sooo, something like this.......

Invoice:

Part1: (THE PART HERE)
Part2: (THE PART HERE)
Part3: (THE PART HERE)
...
...
...
...
Partn: (THE PART HERE) - blank

(aButtonThatProcessesThis)

OR.........

Invoice:

Part1: (THE PART HERE)
Part2: (THE PART HERE) - blank

(aButtonThatProcessesThis)

Is this possible?

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

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 :: Increment Number For Items - Previous Value Plus One

Feb 16, 2014

Like other posters, I need the default value to be the last value plus one. I am using a subform, and the field I need to increment is ITEMNUMBER for items that are ordered for a specific project.

It is acceptable to me to replace ITEMNUMBER with 1 for the first item, I just want it to increment after that.

Clearly the use of DMAX in this situation will not work as ITEMNUM would continue to increment so that any given project might have ITEMNUM values as, for instance, 357-363 when it needs to be 1-7.

BTW - if I could use the maximum value I would set the default value of ITEMNUM on my form as:

(DMax("[ITEMNUM]";"Projects"))+1

View 4 Replies View Related

Forms :: Cannot Select Any Of Items In Form View

Jul 7, 2013

I have created a form with a 2 column list box. This is populated using vba but when I open the form in form view I cannot seem to select any of the items.

View 5 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 :: 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 :: Cannot Open Next Form Which Shows Detail Of Items

Jul 31, 2013

I have a bound form which shows list of items in the stock. When i click on a button it should open another form which shows the details of item which we choose from the first form.the code which i have in click event of the form is :

Code:
Dim strCrit As String
strCrit = "PkID=" & Me.RadStocks
DoCmd.OpenForm "frmIssueRadItems", , , strCrit

It works sometimes but most of the time it gives error saying " syntax error(missing operator) in query expression 'PkID=Airmux 200E DC".

View 2 Replies View Related

Forms :: Change Items In A Combo Box Based On A Field

May 29, 2014

So I have a combobox that pulls values from a table. I am being requested to do an update to the database which means that I have to filter some values on that combobox based on a field on a previous form.For example:The main form is called "frmcontacts" and has a table field called "txttypeofcustomer" which can have two values: "customer" or "dealer".

The form that contains the combobox is called "frmnewissue" the combobox is called "cmbissuetype". "frmNewIssue" is opened through a button on "frmContacts". This combobox pulls the values from a table "tblissuetype". The values in that combobox are then: "Repair" "Return" "Question" "Replace".

If the value on txtTypeofCustomer is "Dealer" then all the values for the combobox remain visible. If the value of txtTypeOfCustomer is "Customer" then "Replace" cannot be visible or has to be greyed out.

View 6 Replies View Related

Forms :: Concatenating Listbox Items - Column Data

Mar 18, 2013

I saw the following code on the forums...

Dim i As Integer, c As String
With Me.ListBox.Column(0)
For i = 0 To Me.ListBox.ListCount - 1
c = c & Me.ListBox.ItemData(i) & ", "
Next
End With
c = Left(c, Len(c) - 2)

This works great!! Now I am trying to concatenate the column 3 of the listbox.

Tried to use the code below (pointing to the second column) but it always returns the first column data.

'Dim i As Integer, d As String
With Me.ListBox.Column(2)
For i = 0 To Me.ListBox.ListCount - 1
d = d & Me.ListBox.ItemData(i) & ", "
Next
End With
d = Left(d, Len(d) - 2)

ItemData does not allow pointing to my 3 column of the listbox.

View 4 Replies View Related

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

Forms :: Using ComboBox To Look-up A Multivalued Field And Select Items In Listbox?

Jul 21, 2014

I'm creating a Form called Pharmacy where I can select a [Diagnosis] from a combo box in the form. This combo box source references a table called tblDiagnosis where each Diagnosis also has a multi-valued field called [Indications].

The Pharmacy form also has a multi-select listbox with all possible Indications. I would like to write a VBA code such that when a Diagnosis is selected, the Indications for that Diagnosis are automatically selected/highlighted in the listbox on the form as well.

As such, by selecting a Diagnosis, all the indications attached to that Diagnosis will automatically be selected; however, if additional indications are needed, they can still be selected afterward.

I know that there is a function Me!Listbox.Selected(i) = True, where i is the row of the entry in the listbox. However, the i in the listbox does not correspond to the ID of the Indication. I think that if there is a way to select listbox items by name, that would be much more efficient.

The reason I have a listbox, is because this listbox of Indications then references another table called tblDrugs where all drugs that are approved for the selected indications selected are filtered and displayed.

View 1 Replies View Related







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