Modules & VBA :: Selecting Combo Value Changes Checkbox On Other Form
Nov 10, 2014
I have form 1 that brings up a record, I then open up form 2 with that record details.
On the 2nd form I have a 'status' combo box with values 'OK', 'bad', 'unsubscribe'.
I want to change the value of a checkbox, 'Active', on the 1st form, 'Maildelivery', from true to false if the combo value is changed to 'bad'
Here's the code:
Private Sub cmb_status_AfterUpdate()
If Me.Status <> "OK" Then maildelivery.Active = 0
End Sub
View Replies
ADVERTISEMENT
Jun 4, 2015
I have a form that is a datasheet. it contains multiple records. One of the fields in that datasheet is a combo box. I would like to make it so when I select a value from the combo box it changes all the values of the other records in that column/field to what was chosen from that combo box. is that possible?
View 4 Replies
View Related
Feb 20, 2014
I have combo box call "supervisor" and check box call "supervisorchange" basically want to make supervisor change to true if combo box is change which I have made code you can see below it work's
Code:
Private Sub Supervisor_Change()
If Me.Supervisor = "" Then
Me.SupervisorChange = False
Else
Me.SupervisorChange = True
End If
End Sub
right now my problem, prob easy fix for you access experts
If the supervisor combo box is empty and user inputs a supervisor I would like the supervisor change check box not to change to true
only if the user changes it after the first input I would like the supervisor change check box to become true
View 2 Replies
View Related
Apr 13, 2005
I have an unbound combo (because it is synchronised with another unbound combo box) box that selects a record, but I can not get it to update the rest of the form to show the required data.
The form looks up project data from 3 seperate tables which are all linked by relationship.
What do I need to do to make this work?
Thx for looking.
View 2 Replies
View Related
Aug 21, 2013
I have a reservation form and I want to tick a checkbox that will filter the form based on what is in the "Reservation Status" combo box.When the checkbox is ticked, the code would remove all records that have "Complete" as a status in the "Reservation Status" combo box. The non-working code that I currently have is:
Code:
Private Sub chkHideComplete_AfterUpdate()
On Error Resume Next
If Me.chkHideComplete = True Then
Me.filter = "[ReservationStatus] = 1"
Me.FilterOn = True
[code]....
View 7 Replies
View Related
Feb 16, 2014
I want to select a subset of table called TRP. It should extract me all records
which got the property Valid to date < enddate.
enddate is a date selected by the user in a form .
Somehow it doesn't recognize the enddate in the following :
Code:
Public Sub test()
DoCmd.SetWarnings False
DoCmd.RunSQL "SELECT TRP.* INTO [TEST] " & _
" FROM TRP " & _
" Where TRP.[Valid to] < enddate"
DoCmd.SetWarnings True
End Sub
View 14 Replies
View Related
Feb 5, 2015
Access 2007
Unbound Form
I have a onclick tied to a label (for decoration purposes) that when clicked it launches VBA that essentially updates a form. All that part works except it will not recognize any changed value of the field I was last in?
Just to try to explain best as I can what happens.
- Form gets opened
- I change field (quantity field)
- I click the Label
- It reverts to pre-existing value.
if I click off of the text field first then do the onclick - it recognizes just fine.
View 7 Replies
View Related
Dec 29, 2013
I am trying to use a list-control on a form to let the user select multiple values. I have understood that this requires some VBA-code to step through the selections in the list, since the "multivalue-selection" is set to "Extended".
When I try to execute the code I have (found and have tried to adjust), then I get the error message "Object required". The "ListCount"-paramater always only results in a ZERO-value, when i step through the code:
Function cmdOpenQuery_Click()
On Error GoTo Err_cmdOpenQuery_Click
Dim MyDB As DAO.Database
Dim qdef As DAO.QueryDef
Dim i As Integer
Dim strSQL As String
[code]....
View 9 Replies
View Related
Nov 8, 2006
I have a quick question on Forms. I have a combo-box in a Form that displays the student ID, first name, last name, and test scores from a source table. I have selected only specific fields to display from the source table in the combo-box. The intention is to note down the ID of a student for future querying purpose and I’m looking at easier ways to do it.
The question I have is, as I look down the drop-down and select a student by his last name (say Johnson), I want the student ID to be selected (or copied) when I click the specific student. There could be many students with same last name, and once I select a particular student from the drop-down, I was wondering if there was a way for this ID to be copied or selected. At present, the student ID is written down and used later for querying other information.
Thanks in advance.
View 1 Replies
View Related
Jun 5, 2005
Not sure what to search for so I thought Id write a new post:
I have a combo box which selects 3 items-
Primary key, Surname, Firstname
After an item is selected, the fields are populated according to the item.
Since there will be many records, it would be nice if the user can begin typing the surname and have predictive text, so the three items should then be-
Surname, Firstname, Primary key
So my question is, how do I get at the primary key if it is not selected?
myText = dlookup("myValue", "myTable", "primarykey = '" & ???? & "'")
If this does not make sense, what I am trying to say is:
The surname is selected, but I want to do a calculation based on the primary key so I get all the data associated with that user. I cant use the surname because there are duplicates.
Thank you
View 2 Replies
View Related
Feb 16, 2005
Hi,
ok part of my database is made of 2 tables.
tblItems
item_id
maunfacturer_id
supplier_id
item_name
tblQuantities
quantity_id_num
item_id
quantity
(item_id linked)
ok so I want a form that has a combo box with [item_id, item_name] on each row that i select. when i select one it displays the relevant quantity and allows me to edit the quantity.
any ideas how i can do this?
Thanks:)
View 3 Replies
View Related
Jul 7, 2006
Hi,
I was wondering if it was possible to use a combobox where you could select a month and year (eg March 2004, April 2004) so I could run a query to find orders made during the chosen time period.
Does anyone have any ideas how this could be done?
Cheers,
Ben
View 1 Replies
View Related
Feb 3, 2014
In Access 2013, I would like to be able to choose more than one value from a combo box, but I believe this is not possible. However, I can prepare a list box and set the Multi Select to Extended. Doing this, I can indeed select more than one value, but I don't know how to get those values into a text field in the form. (If poss, they would become comma separated in that field). Ideally, the code would call the list box because it would take up too much space if it were there all of the time.
View 2 Replies
View Related
May 17, 2007
Hi all
I am trying to get my head around some of the more advanced “features” of access..
At the minute I am trying to change the criteria of a query from selecting a value from within a combo box.. I believe I have got the syntax correct, but I keep getting no results returned..
I am using:
[forms]![frmMovies]![combo2] as the criteria where frmMovies is the name of the form, and combo2 the name of the combo box.. I have set combo2’s source as the table containing the movie information “tblMovies”
Before you ask I am not trying to setup my own movie store, more apply the theory to a bigger DB that I am working on :-p
Hopefully you can help, as I have now been scouring the forums for 2 days and am getting no where..
Thanks in advance
Noel
View 2 Replies
View Related
Apr 30, 2005
i have a combo box containing dates, however it will only display the date at the top of the list, no matter which date is selected.
any help would be gratefully excepted!
cheers
View 2 Replies
View Related
Jul 14, 2006
I seem to remember that there is a way, in a combo box, of entering an entry that isn't displayed in the combo box, so that you can then process that entry into a form's underlying table?
I think the example of doing this was in the MS Samples database for either Access 97 or Access 2000.
Does anyone recall what I'm talking about? Second question, does anyone have a link to those sample databases? Our technicians didn't bother loading the samples for us, so I'm kinda stuck.
Thank you tremendously to any and all who reply..... I'm looking forward to your responses!
View 4 Replies
View Related
Feb 1, 2005
Is it possible to select more than one item in a combo box? I have attached a sample of a database I am working on. I have a table called Interests and on the Bookings form, I would like to be able to select more than one interest in the Interests combo box, but I can't figure out how to do it. In databases I have seen, you simply have to hold down ctrl or shift to make multiple selections - that's what I want to do.
Can anyone help, please?
Thank you!!
View 13 Replies
View Related
Jun 15, 2006
Is it possible to have a combo box on a form and allow users to select multiple entries from the drop-down list? Thats just the tip of the iceburg. If you can, then I'll probably be asking more questions soon.
Thanks in advance.
View 2 Replies
View Related
Jun 24, 2013
I have a form to modify existing property records. Each record has a PIN number and a unique ID which is a combination of year, state county and PIN. The same property can have a record for more than one year. On this form I have a combo box for selecting the record to be modified. The combo box includes PIN and Prop ID. The combo displays each record by PIN then ID as separate records. For example:
PIN Prop ID
06104409012 2007-IL-Lake-06104409012
06104409012 2010-IL-Lake-06104409012
But when I select a record it will always select the first record with identical PINs. In the case above if I click the 2010 ID the record fills in with the 2007 ID.
View 3 Replies
View Related
Jul 22, 2015
I have a combo box that has three items in it. Name, ID_Num, Date
I need to use ID_Num and Date to filter the results of query. I can use one or the other but not both. I have tried ListIndex but apperently am writing it wrong in the expression builder.
[Forms]![TableName]![Combo0].
[ListIndex]????????????
I have tried =0, =1, =2 after the
[ListIndex] but it doesn't work.
How do I use two items from combobox in a query?
View 2 Replies
View Related
Sep 15, 2005
Ok sorry to be a pain :D
I have a main form frmProperty from where you can go via a button to frmTraining and these two are linked by "Property Code".
On frmTraining i have an unbound combobox which gets it data from the tblTraining table. I want this to only display data for the "Property Code" that the frmProperty is pointing to.
I assumed this would just work if the link criteria was present in the button code, however it appears that no matter what the "Property Code" the combo box displays all the data in the tblTraining table.
Anybody have any ideas?
Many thanks
View 1 Replies
View Related
Sep 29, 2005
Hi,
Is it possible when choosing a combo box to have it make a text box visible, when in this text boxes properties you've chosen visible=NO. Can an event procedure or some code be written that will make visible=YES.
Thanks any help with be greatly appreciated
View 1 Replies
View Related
Sep 29, 2006
Selecting a value from an unbound combo box in Access 2000
Hi,
I am attempting to default a combo box to a value I have passed in. I have already populated the combo box dynamically by setting the column numbers and widths and specifying the row source as Value List, supplying the row source string.
Since I am working with classes and collections, I wish to avoid data binding as I would prefer that the classes handle everything, which they can do.
Now my problem is that I cannot find how to select the correct value on the dropdown after populating it with all the values. When I try a line like:
cboAppType.Column(0) = lngValue (where lngvalue corresponds with a value in the list)
it returns the error "object required". It won't recognise the column at all, even though it sees and displays the rows and columns.
I am beginning to tear my hair out as I have been struggling against Access all the way to try and implement unbound combo boxes and listboxes and having overcome everything else, I'm stuck just here.
Any help very much appreciated - thank you
View 2 Replies
View Related
Sep 30, 2005
Hi,
Is it possible when choosing a combo box to have it make a text box visible, when in this text boxes properties you've chosen visible=NO. Can an event procedure or some code be written that will make visible=YES.
Thanks any help with be greatly appreciated
View 1 Replies
View Related
Mar 31, 2014
I have two dropdown boxes on my form, the second is dependent on the first and shows only employess from the company selected in the first dropdown box. I am using an AfterEvent update to filter the employees.
Now when I try and choose an employee other than the first one on the list it automatically goes back to the first person and the info in the subform only shows their information.
View 9 Replies
View Related
Sep 11, 2013
I have a working combo box on a form that displays issue numbers for part number typed into a text box.This all works fine when the list of issue numbers is below the displayed list (16), but when the list is longer than 16 you cannot seem to select anything after item 16.
When the combo box has, say 25 items a scroll bar appears allowing the user to scroll down to item 25, but when you click the mouse the list just reverts back to the first 16 items? The only way to select an item after 16 is to select item 16 which then closes the combo box, then when you reopen it the list now shows items 17 to 25 which you can then select item 25.
This is the same in reverse, when you have item 25 selected, you cannot select item 1. When you click the mouse the list reverts back to items 17 - 25.The combo box is populated in code using the lost focus event on the text box for the part number.
View 7 Replies
View Related