Requerying Subform Issues!!!

Have a main form that contains a subform. The main form data comes from a table and the subform gets its data from a query. The main form has a combobox that I use to write criteria to the query of the subform.

The combo box operates properly. I see all my data in the combo box. My issue is when I select data in my combobox, lets say the number 99, nothing happens in my subform.

If I change records of my main form and come back to the previous record, the "99" is showing in the subform along with the other data I want.

I want the subform to change as soon as I select my data in my combobox. I wrote some code so when the combobox updates, it requerys the subform. But what happens, the subform requerys, and just the field that my combobox writes to updates, the other fields are blank.

Then, if I change main records and come back, the data is there. What am I missing?

Sponsored Links:

Related Topics

Subform keeps requerying
I have a subform that is linked to the main form by 3 parameters, and produces several sums. It will not stop requerying, and keeps going to the first record.

Requerying a Subform
Having trouble requerying a sub form

Parent - [F_TL_SUMMARY]

My code - Forms![F_TL_SUMMARY]![F_TL_SUMMARY_DETAIL].Requery

ActiveX Calender Control not requerying Subform
I have a table called 'Tasks', where a date is entered along with a short description of the task.

I then created a form with an ActiveX 'Calender' on. I also created a subform, this is a datasheet view of all records in the 'Tasks' table.

When I click on a new date on the Calender, the subform should be requerying, thus showing all records relevant to the date. However, it doesn't work. It only shows the correct data once I press F5 to refresh.

I have set the following code in the Calenders' 'On Updated' event.

Private Sub Calendar0_Updated(Code As Integer)
Me!TasksSubform.Requery End Sub

Is there something glaringly obvious that i've missed off

Form & Subforms
I am somewhat new to designing Access databases. I have one master form that contains employee details and another subform that has employee issues and another subform that contains meetings about the employee issues.

I don't believe I have my forms are linked properly. My main form contains employee ID, this is a lookup field which is calling the employees table. When I enter the employee ID, all my other controls auto-populate. I then have a command button which opens my subform Issues. I have the employee id control in my issues form equalled to the employee ID in my Employee details form (master form). However, when I go to add new employees and I click the subform Issues, all the records are there, I would like to have a new record when there is no employee id equalled to the ID in the employees table.

Subform Jumping to first record field
and have created a databse in Access 2000 for logging customers and orders at my workplace.

I am having a huge problem with a subform which when entering data into it randomly puts the cursor to the first field of the first record within the subform. The consequence of which is that the data in the first field gets overwritten if you are not careful. It is not consistent so please play around by clicking various fields within the subform.

The form in question is FrmRepairdetails with the subform SFRMRepairDetails.

I have spent ages searching forums for an answer but they all talk about requerying or refreshing causing problems but I do not believe this is the case with my db

Requerying Parent form is causing endless loop
I have the following code from a subform in datasheet view which I want to requery the Parent form after a new record is created on the subform by making a selection in a combo box:

View Form/subform data specific client
I have a form which displays client information and a subform that displays 'issues' logged for each client. We want to be able to prompt for a specific client number and display the 'issues' that have already been added for that client and be able to add new 'issues' as well.

The form and subform each have a DQRFileID field to link the records in a one to many relationship.

I was prompting for the client number (from the query in the recordsource) in the form and it displays the client info but not the subform issues that have been added.

Is there something I'm missing?

(Using Access 2007)

Finding the last record
Hopefully this is a simple one. I am running an append query to update my database. I am then requerying it to display the record. On requerying it jumps to the first record in the database. I need it to go to the last record.
Can anyone suggest the code to just simply select the last record please

Filter on Subform Not Displaying as Expected
I'm filtering a Main form based on a field in the Subform. I seem to have that working correctly but it displays in an unexpected way. I have two contracts with Open Issues. Contract # 1 has 3 Open Issues and 1 Closed Issue and Contract # 2 has 1 Open Issue. When I look at the query results the Main form is based on it shows these 4 Issues with all details correctly but when I display them in the form, my Main form shows 1 of 4 records.

As I step through the first 3 records (Contract # 1) neither the Main form nor the Issue form changes. It only changes when I get to the 4th record (Contract # 2).

I was expecting the Issue subform would display a different issue as I stepped through the Main for records (4 records) but it just shows 1 of 3 records (displays only the first record in the subform) in the Issue subform for the all 3 records in the Main form so I am seeing the same information three times! OR I was expecting the Main form to display 1 of 2 records (only 2 contracts have Open Issues), then I would have to step through the Issue subform to see the Open Issues for that contract.

If I use a combo box in the Main form to filter what I see in the subform, are the results I am getting correct? I would prefer the Main form to show 1 of 2 records.

Search Box Requerying Subform problem
I'm trying to build a text box to filter a subform. I have the main form "Navigation", the subform "Loan Search subform" and the textbox "Search"

When I run the Loan Search query with Search populated, it filters and works correctly. When I try to have it requery automatically, it doesn't seem to.

I have tried every combination of

Forms![Navigation]![Loan Search Subform].Requery
Me![Loan Search subform].Form.Requery

that I can think of. Some throw error messages. but no requery occurs.

Subform results
I have a form that has 2 comboboxes. These 2 cbo's are suppose to be the criteria for my subform.

The subform record source is as follows:

SELECT tbl_CurrentInv.Itemname, tbl_CurrentInv.Itemsize, tbl_CurrentInv.Itemvendor, tbl_CurrentInv.itemBay, tbl_CurrentInv.ItemAsOfDate, tbl_CurrentInv.ItemDateArrived, tbl_CurrentInv.Item_OddBox, tbl_CurrentInv.Item_OddMatt, tbl_CurrentInv.ID FROM tbl_CurrentInv WHERE (((tbl_CurrentInv.Itemname)=Forms!frm_Test!Combo0.value) And ((tbl_CurrentInv.Itemsize)=Forms!frm_Test!Combo2.value));

Combobox 0 is itemname and Combobox 2 is itemsize

the SQL was created through access based on the query screen. I typed the Forms!frm_Test!Combo0.value etc in the query screen.

I have verified that the table contains the data I am querying for, but no records show up in my subform. I have tried requerying the subform but still no records

Form SubForm Issues still
Main Form is SalesOrder SubForm is SODetail Query subform. The linking filed is SO#. Which is hidden on the footer of the subform. When I look at the tables the subform has the correct SO# as the main form. When I look at the form on the screen the forms are seperated correctly. however ,when I do a print preview ALL the subforms show up with each main form.

Has to be simple what did I forget

Subform scrolling is jumpy
I have some subforms with vertical scrollbars. When the user tries to scroll, the subforms redraw every row with each click of a the scroll arrow, making for a very distracting visual experience. Is it requerying every time or something? Is there any way to fix this

cbo box to subform + add records
I want to have a combo box select a record and display that record's information in the subform. This can be based directly on the table, or from a qry (I already have a query because I use an expression for a concatenated lname & fname & dob elsewhere). I've accomplished this by having the cboSelectedPatient on the main form, and appropriately linking the master & child link properties, and requerying "On Update". ...

Show All Columns on Subform on Open
I have a from with subform where the columns that are visable in the subform are controlled by checkboxes on the parent form.

I am trying to find a way to ensure that ALL the columns are visible when the form is opened, however I am running into a couple of issues:

DoCmd.RunCommand acCmdUnhideColumns

doesn't seem to work and crashes Access (I think because I am trying to use it on a subform - I have also tried it including a 'With' statement)

Forms!Orders![Orders Subform].Form![ProductID].ColumnHidden = False

works, however is very impractical due to the amount of columns in the subform.

Does anyone know a way of applying this to all of the columns? Or a way to loop through the columns, maybe something like.

for each clm in subform .ColumnHidden = False

Subform unbound textbox value not updating on main form open
I have a subform which is linked to a table on which I have a set of comboboxes and textboxes. When data in the comboboxes is chosen, the textboxes populate with numbers and the underlying table is populated.

I also have an unbound textbox which calculates using a function the sum of the values in the textboxes. I don't need to store this value, it's only for display. When I open the subform independently the value in this unbound textbox shows correctly, but when I open it using the main form the value shows as 0, and only updates when I choose something in one of the comboboxes. I also tried calling the function from the main form, but that definitely sets the value to 0.

I have tried requerying the controls from the main form on open/load etc

Issues Template
I have downloaded the issues template to work in a vet office, but am not sure what the Add related issues is for on the Issues details form. I just want to know what it does and its benefits

Referencing Controls on Forms
I have a main form, 2 sub forms, and 2 text-boxes on the main form. I have a search box now for the first subform. Works perfectly. Once the users filtered based on name, I want them to be able to select that filtered record which would filter another subform.

My first attempt was to assign the ID that was selected to a textbox on the main form, then automatically requery the second subform based on that value. I used this way on my search box. I'm sure there is a way to go directly from clicking the value to requerying the second subform, but I don't know it. If you do,

That being said even the indirect first attempt isn't working. It all has to do with the ".", "!", and ordering of this stuff. I'm not sure what . and ! mean. Cananyone explain them, It has to do something with Parent child, but beyond that I'm at a loss.

Me.[Collateral] = Acct_Reference_id
Me.[Navigation]![textbox] = Acct_Reference_id

I did find this very useful site [LINK]. It shows what code you can use depending on where you are and what you're doing. Even with that as a resource, I'm still at a loss.

Rounding and Formatting Issues
I would greatly appreciate some help on a couple of issues:

1. Workorders by Customer subform is not calculating properly:
The currency is rounding (how to prevent this) so the result is not the same as on the Workorder and the Amount Due is blank.

2. When opening the Workorder on the heading it shows the WorkorderID not formatted as 5 digits like on the field WorkorderID. I would like to show it as 5 digits.

Remain on record that I was editing in a form after requery
I have created a form for user input (comprised of text boxes and list boxes) and a subform that shows the results of some calculations that are performed on the user input. If I make a change to the user input and requery to see the updated results in the subform, Access jumps to record #1, no matter which record I was editing. I then have to manually go back to the record I was editing (and first I have to remember which one that was out of hundreds) to see the results and make additional edits.

Is there any way to automate the process so that Access automatically goes back to the record that I was editing after requerying? I would imagine there is,