Problems with combobox requery Results

Hello,

I have a form with 4 comboboxes, each of them based on a query from a table, so, queries from 4 tables.

If the user does not find the information on the combobox, he push a button and the corresponding form opens. He enter the data, close the form and returns to the form where is the combobox.

For a single combobox the data requery work. But if I enter in each form corresponding to the table on which the comboboxes are bounded, only the first time the Requery is executed. I have Requery for the 4 comboboxes on form.GotFocus and on each combobox.Enter.

Can you tell me why the requery is executed just one time and no each time when I come back in the form from another form?

I work in Access 2007.

Thank you,
Robert

Let's begin with the path. First tier, click "contacts". Second tier loads "lookup". You click a letter from the alphabet and the combobox populates. You pick from the combobox and it loads the "contact card" portion of this form. All of this works like peaches. I have an "edit" link so that you navigate away from the contact card. I have no problems with the browse to portion ...

1. set tempvar
2. browseto "Contact List" where id=id

The "contact list" is part of the first tier's "contacts" tab, but is a second tier button named "manage".

Everything works great on this page until I want to use the search boxes and combo box. They populate, but the refresh or bookmark or some such stops working after the browse to.

Funnier still yet .... If you click the "manage" button after you browseto, the combobox selection will load.

What the heck?

Code for the box refresh button is in the onclick event ....

Quote: Private Sub Command74_Click()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![combosearchbox], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub Code for the search boxes' button to populate the combobox ....

Quote: Private Sub refreshSearchbttn_Click()
Dim query As String
'Define row source after selection and open first contact in table
query = "SELECT [qryContactList].[ContactID],[qryContactList].[FirstName] " & _
"& "" "" & [qryContactList].[LastName] AS Name FROM qryContactList " & _
"ORDER BY [LastName], [FirstName];"
Me.combosearchbox.RowSource = query
Me.combosearchbox.Requery
'Shows name of first contact and expands the list
Me.combosearchbox.SetFocus
Me.combosearchbox = Me.combosearchbox.ItemData(0)

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![combosearchbox], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'Set focus on search box and drop list down to show all contacts of search
Me.combosearchbox.SetFocus
Me.combosearchbox.Dropdown

End Sub While I am tweaking still yet, the code is a little rough or disorganized.

Tell me what the heck is happening after the browseto that essentially disables this code.

Edit: Option Expicit and still compiled. :-/ Problem remains.

Hi Everyone,

I have a form with combobox which has a corresponding customer part number for our own partnumber.

When a customer part number which does not exist in the combobox is entered, the "AddNewCustPartNo" form will pop up. The idea is to have the NewData(the new customer part number) already filled in when the form pops up and fill in the rest of the form manually.

However, when the AddNewCustPartNo pops up, the field is not filled in with the NewData. Below is my code and can anyone tell me what's wrong with the code?

------------------------------------------

	Code:
	 
Private Sub CustPartNo_NotInList(NewData As String, Response As Integer)
Dim ButtonClicked
ButtonClicked = MsgBox("The customer part number " & _
NewData & " , doe not exist. Do you wish to add " & _
NewData & " to the customer's part list?", vbYesNo)
If ButtonClicked = vbNo Then
CustPartNo.Undo
Response = acDataErrContinue
Else
 
Response = acDataErrAdded
DoCmd.OpenForm "AddNewCustPartNo", , , , acAdd, acDialog, NewData
CustPartNo.Undo
CustPartNo.Requery
CustPartNo = DLookup("CustPart_ID", "CustPartNo", "CustPart_No= '" & NewData & "'")
End If
End Sub



Hi!
I have a Form FRegulier containing a subform SFRegulier.
The form is bound to a query, the subform SFRegulier is bound to another query.
In the details section of SFRegulier, I have a combobox lstEqNaturelle, who have the RecordSource REquipeNaturelle2, which has 7 fields. The combobox is bound to the first field. It is not bound to my form of subform's RecordSource.

When I modify the combobox, the values in it either update the subform's current record, or add a new one, if the current record is a new one.

Here is my code:

	Code:
	Private Sub lstEqNaturelle_AfterUpdate()
    ' Update the current record using lstEqNaturelle's values
    If Not IsNull(lstEqNaturelle.Value) Then
        With Forms("FRegulier").SFRegulier.Form.Recordset
            ' Determine if we have to Add or Edit
            If Forms("FRegulier").SFRegulier.Form.CurrentRecord > .RecordCount Then
                ' Add
                .AddNew
                !camNum = lstEqNaturelle.Recordset("camNum").Value
                !equSerNumero = lstEqNaturelle.Recordset("equNatNum").Value
                !depNumChef = lstEqNaturelle.Recordset("depNumChef").Value
                !depNumCompagnon = lstEqNaturelle.Recordset("depNumCompagnon").Value
                !quaNum = Forms("FRegulier").Recordset!quaNum
                .Update
                .Bookmark = .LastModified
            Else
                ' Edit
                .edit
                !camNum = lstEqNaturelle.Recordset("camNum").Value
                !equSerNumero = lstEqNaturelle.Recordset("equNatNum").Value
                !depNumChef = lstEqNaturelle.Recordset("depNumChef").Value
                !depNumCompagnon = lstEqNaturelle.Recordset("depNumCompagnon").Value
                .Update
            End If
        End With
        ' Set back the list to Null
        lstEqNaturelle.Value = Null
    End If
End Sub

It works, except the first time i run it. It bugs on the .Update (either after the .Add or .Edit), because lstEqNaturelle.Recordset("everydamnedfields").Valu e equals Null. But only the first time I use it!!!

I've tryed Requerying the combobox at the very begining of the procedure, but the I got another error : no current record. (Me.Recorset.AbsolutePosition = -1). But then i just press F5, and the code works fine without changing anything.

I think I need to wait after the lstEqNaturelle.Requery, but I don't know how. I've tryed putting a MsgBox, which doesn't work and looping until the value are not Null, which never ends. But if I put a breakpoint after the lstEqNaturelle.Requery and continu execution after waiting 5 seconds, it works.

Is there a way I can force Access to wait until the requery is done?

I am confused. Time is playing against me!!! HELP!!!

Hint : I realized the values form lstEqNaturelle.Recordset("everydamnedfields").Valu e are Null because the first record of my combobox's RecordSource REquipeNaturelle contains Null values. But it is not the record I selected in the list. If I remove the first record containing the Null values, the values from the first real record are used instead of the good ones.

I have a form (frmEdit) with 2 combo boxes. The first combobox (cmbLogNum) is used to filter the contents of the second combobox (cmbCDC2). I have a notinlist event for the cmbLogNum to open e new form (frmAddIncident) to add a new record to the database. The new record is added and frmAddIncident is closed. The problem is when you select the new incident & the CDC#, the data in the fiels should be blank but they are filled in. If you close the form and open it again it works OK. I think the issue is that cmbLogNum is not being updated from the query that populates the combobox. I tried to requery both the form and combo box but got errors both times.
Any suggestions?

Hello-

I have a form (frmEval) that I use to both enter new and edit older records. The form has a combobox used to pick an order, with associated textboxes populated with characteristics about the order number (program, item, serial number). Using the form in the edit mode, I have no problems. The combobox and textboxes are linked directly to the recordsource and populate and change as I change from record to record. They are basically in "read-only" mode.

However, when entering the data as a new record, I can't easily have the supporting textboxes populate after entering the combobox choice. I know the main reason for this is the form hasn't had it's recordsource updated with the combobox entry I just made, but any version of requery in an AfterUpdate event macro doesn't work out. It either doesn't update the textboxes at all or closes the current record entry, leaving the record with only combobox data. It then opens a new blank record.

I know and have used unbound textboxes that get updated on an combobox AfterUpdate event. This is a real pain since I have to update the boxes every time the record changes or the form is opened. I also see a lot of value in having the textboxes directly linked to the recordsource, especially when I use the form in edit mode. Everything works so nice and is fairly bulletproof (espcially compared with my macros).

Is there anyway to get my recordsource requeried/refreshed/???? so I don't have to do anything crazy like I've been doing in the past?

Guys,

I am a newbie to Ms access. I am having a problem with a modified Order Details form from Northwind 2007.

This form has a main form (Order Details) that has a Beneficiary ID combobox. It also has a subform with the fields ITEM, QUANTITY, PRICE, DISCOUNT SUBTOTAL AND BENEFIT ID (Combobox)
Each Beneficiary has one or more benefits that they have selected beforehand and all transaction items will be assigned to one of the selected benefits.

When I first open the Order Details form and choose a beneficiary from the CUSTOMER ID Combobox on the main form, the correct benefits that were selected for that person are shown in the subform in the BENEFIT ID Combobox.
If I should choose another beneficiary the correct information is also displayed. IF I SHOULD CLICK IN THE DATASHEET ON THE SUB FORM AND THEN CLICK BACK ON THE CUSTOMER ID FIELD ON THE MAIN FORM AND CHANGE THE BENEFICIARY,
then the benefits selected in the Benefit ID combobox of the subform do not change.

The benefits displayed in the combobox of the subform should be requeried each time a different beneficiary is chosen of the main form. I have tried the following code and various other things but with no success. I suspect that I may not be using the correct form events.

Please let me know what I am doing wrong.


MAIN FORM - Customer ID afterupdate event

Private Sub Customer_ID_AfterUpdate()

Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID]= NULL
Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID].Requery
Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID]= Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID].ItemData(0)

End Sub


MAIN FORM - Form Current Event

Private Sub Form_Current()

Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID].Requery

End Sub

Hello! I'm relatively a newbie in access 2007, but i had my way around sql years ago, and sometimes i do some developing. Now, for a project, i was asked to program an access 2007 database with some forms that display data. It was an interesting challenge, because access handles things differently...
Anyway, i've solved several problems with the help of several forums, but now i have a new one:

I have a form that has 3 comboboxes, each one triggering a query onafterUpdate:

Private Sub combo_proyecto_AfterUpdate()
Me.combo_sitio.RowSourceType = "Table/Query"
Me.combo_sitio.RowSource = "ask_idsitio"
Me.combo_sitio.Requery
End Sub
'---------------------------------------------
Private Sub combo_sitio_AfterUpdate()
Me.combo_panel.RowSourceType = "Table/Query"
Me.combo_panel.RowSource = "ask_quepaneles"
Me.combo_panel.Requery
End Sub

End Sub

the first combobx selects a project; that feeds the second combobox with the different sites on that project (a query inside this combobox takes a value from the previous combobox: id and name) and that feeds another combobox with items that are on that category (with another query, as well). It works pretty good! but now i want to populate several textboxes with the result of the last triggered query; so, the query inside this last combobx is more extense than the queries inside the previous comboboxes, and I populate the textboxes like so:

Private Sub combo_panel_AfterUpdate()
Me.uno = Me.combo_panel.Column(0)
Me.dos = Me.combo_panel.Column(1)
Me.descripcion = Me.combo_panel.Column(2)
Me.tres = Me.combo_panel.Column(3)
Me.cuatro = Me.combo_panel.Column(4)
Me.cinco = Me.combo_panel.Column(5)
Me.seis = Me.combo_panel.Column(6)
Me.siete = Me.combo_panel.Column(7)

works relatively good, but here comes the trouble: it only displays the results to the column 2, and the rest is all blank. If i run the query alone, it works perfectly, displaying all results, but for some extrange reason it doesnt run good within the form. Here's the query:

SELECT DISTINCT tabla_muestra.panel, tabla_muestra.[codigo muestra], tabla_muestra.[descripción de la figura], tabla_muestra.ruta_imagen, tabla_muestra.color, tabla_muestra.[codigo color], tabla_muestra.id, tabla_muestra.[adscripción temporal]
FROM tabla_muestra, tabla_relacion_sitios
WHERE (((tabla_muestra.id_sitio)=[Forms]![testing]![combo_sitio]))
ORDER BY tabla_muestra.id;


what could it be?

thanks in advance... i hope my explanation is clear... :s

Hi everyone,
I experience the following problem.

I have form1(datasheet view) which get records from table1.
In this Form1 there are 4 fields customer_id,Name,Surname and Address.
Address is a combo box which gets records from a query (customers_and_address_query :

SELECT cust.customer_id,cust.name,cust.surname, addr.street
FROM cust INNER JOIN addr ON cust.customer_id = addr.customer_id
WHERE (((cust.customer_id)=[Forms]![Form1]![customer_id]));
)

The problem is that when i choose an address from the combobox for a specific customer(e.g. the 1st record of the Form1) ,when i move to another record ,the records of that combobox are still the same as the ones of the 1st record(1st customer).

I tried the following code but the problem persists.address1 is the name of the combobox.

Private Sub address1_AfterUpdate()

Me!address1.Requery

End Sub

Additionaly,if i select something from the combobox for the 1st record-customer of the Form1 its ok,but when i move to the 2nd record of the Form1 and try to select something from the combobox (it has similar records regarding the records of the combo for the 1st record of the form as i explained above) ,the record of the combo for the 1st customer of the Form1 disappears!!!

Can anyone help me with these 2 problems???

Thank you in advance!

Hi all,

I've seen similar post with a similar problem but it doesn't answer my question! . I have a form (A97) with a unbound combo box that uses a bookmark to retrieve records. I have another form from a command button where you can add a new record. The combo box value isn't the Primary Key field (PK is a autonumber) but the name of an employee. It has a 2col. SQL lookup with the PK col hidden.

So far i've managed to get the first form to open the 2nd form, add the new user, return to the 1st form and refresh the records so that the new record Autonumber appears in the relevant PK field and the other details.

What I want is that the value of the staff name is the shown in the combo box. I've tried Me.refresh, requery and the best i've managed to do is get the new record on the form but in the combobox I get blank (me.refresh) or the name of the 1st record (with me.requery). Is there a way to get the value of this text field to be the activevalue in the combobox.

I've tried setting the .defaultvalue and .value to the new name but it still comes up blank.

Any ideas or am I asking too much??? Thanks

Peter.

I am getting a runtime error 438 on a requery that I can't figure out what I am doing wrong. I have a form with a combo box that I have the users entering a project name in the combo box. If the project name does not exist, I have another pop up (onLoad) form for them to enter the new project data. This subform has a save and close form button. When I close this form, I get the run time error. When I debug, it indicates the error is at the requery line. If I check the table where the combo box gets its data, the new entry is there.
I followed a previous post that I searched on from Mile-O-Phile. It was very helpful thus far. Here is my code behind what I am trying to accomplish.


Private Sub Project_Title_NotInList(NewData As String, Response As Integer)
Response = MsgBox(Me.[ProjectName] & " is not recognized in this database." & vbCrLf & vbCrLf & "Would you like to add it?", vbQuestion + vbYesNo, "Unrecognized Data")

If Response = vbYes Then
DoCmd.OpenForm "frmAddProject", acNormal, , , acFormAdd, acDialog, NewData
Me.[ProjectName].Requery
Response = acDataErrAdded
Else
Me.[ProjectName].Undo
Response = acDataErrContinue
End If
End Sub


It may also help to know, the combo box table is tblProject. my combo box control Source is ProjectName, so the field name and the combo box name are ProjectName. Could this naming be causing the problem. BTW, I am using Access 2000.
Any help is greatly appreciated.

Hello, before post this question I've looking for into the forum but without success. I hope you can help me with some related combobox that allow the user to select a level and 2 sublevels for an element.
I've attached the example base where you can see the problem. The two main form are frmElement (wich one seems to work bad) and tbL1 (wich one works well and includes two subforms)
Now when you make a new record all seems go well but if you make a second one, fill the levels and comeback to the first register something happen, it doesn't work well. When you navigate between some records then you will see that the selected levels for the first record are lost. Note: I've forced requery on subcategories that depends on her parent in afterupdate event.
Thanks for your time!

I have been through many of these threads to try to figure this out on my own but I've had no luck. Lot's of combobox question but I couldn't find this one.

I have a training form with a button that will add new employees if the one your trying to enter training on is not in the list (employee table) I have a second form that pops up and the user can add the employee, save and return to the training form to continue to enter training for the new employee. I would like to keep the data in the training form and just requery the employee table combo box. The requery code seems to work (after looking through several messages to find out how to do it) but it won't requery until I save the record on the Training form and I can't save it because it's not in the combobox?

I guess I could just clear the employee name field on the training form when I open the second form but can't figure out how to do that either.

Access comes so easily sometimes but sometimes I need to use a hammer. This is a sledgehammer problem for me.

I have used your very informative information on cascading comboboxes. It works well except when the requery activates it erases all information in the childID field on all records except the current one.

In the cboParent AfterUpdate event I have the following code:
Me.cboChild.Requery
This is what erases all other information in the other records. What else can I use to keep the cboChild updated? I tried a DLookup in the forms Current event, however, I have problems with the correct syntax.

Thanks.

Hello,
I have set up a form which will be used for filtering reports. I would like to be able to generate a single report and in order to do that I will have to filter three fields.

I am using three combo boxes to achieve this. The three fields I am filtering are as follows: Tenant Name, Building Name, and Unit

The Tenant Name and Building Name work perfectly but I can't get the rowsource for Unit to display any values.

Here is what I have so far:

For the tenant name:
rowsource:

	Code:
	 SELECT Tenants.[Tenant Name] FROM Tenants ORDER BY [Tenant Name];

The above displays all the tenants that currently have leases.

Once the Tenant Name is selected the Building combobox is populated with all the buildings leased to the selected tenant (Tenants can lease more than one building). This is achieved by the following:
rowsource:

	Code:
	SELECT distinct Leases.LeaseID,  Leases.[buildingName]  FROM Leases WHERE (((Leases.Tenant)=[forms]![Lease
Offer]![tenantCombo])) UNION select distinct null, null FROM Leases ORDER BY Leases.[buildingName];


This also works perfectly. Only the buildings that are occupied by the tenant are displayed.

Now for my problem. Because, not only can the tenant be holding a lease in more than one building, but they can also have more then one lease in the specific building (ie for a specific Unit number). So what I am trying to do is to have the Unit combobox display only the unit numbers that the selected tenant is leasing in the selected building.

I tried to simply modify the rowsource of building name but it is not working (the combo box is always null).
rowsource:

	Code:
	SELECT distinct Leases.LeaseID,  Leases.[Unit]  FROM Leases WHERE (((Leases.Tenant)=[forms]![Lease Offer]![tenantCombo]) AND
 ((Leases.buildingName)=[forms]![Lease Offer]![buildingCombo])) UNION select distinct null, null FROM Leases ORDER BY
Leases.[Unit];

So this is where I need help. This is very important to my project because, it is the only way I see being able to filter my report to a single specific lease.



Also, not sure if it will be useful, but I had trouble to get just the first two comboboxes working but I eventually succeeded, so if anyone is interested on how to achieve these to update here is the code:

It is only basically three functions:

'this is the "On Current" even of the form

	Code:
	Private Sub Form_Current()
buildingCombo.Requery
unitCombo.Requery
End Sub

'this is "On Change" event in the the tenant combo box. the building part 'works but the unit combo doesn't. However, I'm pretty sure it is a problem 'with the actual query not the code below

	Code:
	Private Sub tenantCombo_Change()
buildingCombo.Value = Null
unitCombo.Value = Null
buildingCombo.Requery
unitCombo.Requery
End Sub

'this is "On Change" event in the building Combobox, however it is not doing 'anything for me now.

	Code:
	Private Sub buildingCombo_Change()
unitCombo.Value = Null
unitCombo.Requery
End Sub


Thanks in advance for any input you might have.

Eric

I have a combo box in a form that uses a query to access values from a different table, and dispaly them as choices. This works great. The first problem I encountered was if the value that was needed to be entered was not in the list, then there should be an option to add it. I found a couple good examples by using the NotInList definition to achieve this. And it works, when a new value is added, a message box comes up asking to enter the info in the database and the needed form then pops up. But when I close the form, the value is not in the combobox. Now I also researched this for a while, and found out about the function ComboBox.Requery, but I don't know where to put it to work.

Here's a more code definition of what I'm trying to do/have:


	Code:
	Private Sub Building_NotInList(Newdata As String, Response As Integer)
    If MsgBox("""" & Newdata & """ is not in the customer list. Add it?", 33)  1 Then
        Response = DATA_ERRCONTINUE
        Exit Sub
    End If
    DoCmd.OpenForm "addbldgform", , , , 1 'Data Entry Mode
    Response = DATA_ERRCONTINUE
End Sub


I was thinking about putting the ComboBox.Requery inside the AfterUpdate of a field in the addbldgform, so that when a new entry was added it would update by writing this in the AfterUpdate:


	Code:
	Form!buildingPractice!BuildingID.Requery

but that gives me an error saying that the field buildingPractice can't be found, when it is really a form with the value BuildingID (the name of the combobox that needs to be updated)

Sorry about the long definition, I just wanted to be clear, hope someone can help out.

- kevygee

Hey y'all I have a bit of a predicament.

I'm working on a PO tracking system and I've got it done for the most part and it's currently in use. I am however having a problem with it and hoping someone can help me out.

On my main form I have 2 subforms (PO's and Return PO's) both with comboboxes which list our vendors - stored in their own table. When someone has the "Add/Edit Vendor" form open and has added or edited vendors I would like to have the main forms subforms update to reflect those additions or changes when the user presses the "close form" button on the "Add/Edit Vendors" form.

I played around with all sorts of different basic strings of code trying to get this to work and got a vb error every time.

Thanks for your help guys!

Basic Form Structure:

*FormA
-SubformA
-SubformB

*FormB

Basically looking to have a control on FormB that will requery the comboboxes on SubformA and SubformB.

I am thinking the string should look something like this....

Forms!POTracker![PurchaseOrders subform].Form!Requery

I have a listbox(includesA) which works via combobox(sel_mac) update sort and the field values that were selected prior, however, the values it posts are numeric ID values and not the actual field values I want to be shown in the listbox.
Any ideas on how to fix this problem? I have some code below that pushes the updates from the combo to the list.

Private Sub sel_mac_Change()
Dim strSQL As String
strSQL = "SELECT Includes.macro_number, Includes.macro_part1, Includes.ID, Includes.catagory FROM Includes WHERE (((Includes.catagory)=" & Forms!Proposals!sel_mac & "))"
Me!includesA.RowSourceType = "Table/Query"
Me!includesA.RowSource = strSQL
Me!includesA.Requery

End Sub

I have included a snapshot of the problem area.


Hello Guys,

I am a newbie to Ms access. I am having a problem with a modified Order Details form from Northwind 2007.

This form has a main form (Order Details) that has a Beneficiary ID combobox. It also has a subform with the fields ITEM, QUANTITY, PRICE, DISCOUNT SUBTOTAL AND BENEFIT ID (Combobox)
Each Beneficiary has one or more benefits that they have selected beforehand and all transaction items will be assigned to one of the selected benefits.

When I first open the Order Details form and choose a beneficiary from the CUSTOMER ID Combobox on the main form, the correct benefits that were selected for that person are shown in the subform in the BENEFIT ID Combobox.
If I should choose another beneficiary the correct information is also displayed. IF I SHOULD CLICK IN THE DATASHEET ON THE SUB FORM AND THEN CLICK BACK ON THE CUSTOMER ID FIELD ON THE MAIN FORM AND CHANGE THE BENEFICIARY,
then the benefits selected in the Benefit ID combobox of the subform do not change.

The benefits displayed in the combobox of the subform should be requeried each time a different beneficiary is chosen of the main form. I have tried the following code and various other things but with no success. I suspect that I may not be using the correct form events.

I have attached a TEST DB.
Username: Test Employee
Password: Test
VBA Password: rocky123

Just log in and choose the New Transactions button on the home page. Please let me know what I am doing wrong.


MAIN FORM - Customer ID afterupdate event

Private Sub Customer_ID_AfterUpdate()

Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID]= NULL
Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID].Requery
Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID]= Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID].ItemData(0)

End Sub


MAIN FORM - Form Current Event

Private Sub Form_Current()

Forms![Order Details]![sbfOrderDetails].Form![BENEFIT ID].Requery

End Sub Attached Files Test.zip (722.8 KB, 24 views) Reply With Quote 12-28-2009, 12:26 PM #2 RuralGuy Administrator Windows XP Access 2002 Join Date Mar 2007 Location 8300' in the Colorado Rocky Mountains Posts 9,484 Why do you use a WhereCondition of "1=0"?

I have one combobox -- "Frequency" and a second combobox -- "Day."

I have this set as an afterevent of my Day combobox:

Private Sub Day_AfterUpdate()
Dim Qry As String
Qry = "my query that populates the second combobox correctly"
ComboBox.RowSource = Qry
DoCmd.Requery "Day"
End Sub


The problem is that the second combobox doesn't seem to update anymore no matter what I choose for the first combobox. I need that second combobox to be updating with whatever I choose in the former.


Not finding an answer? Try a Google search.