Forms :: SubForm To Display Test Results In Date Order
Oct 7, 2014
I am having an issue with the sort order on a subform.
Basically I have a main form with Client Details and a subform hich displays the associated test results for this client. Each client can have multiple test results which should be displayed in date order.
Initially the form was based on the table 'TestResults' and I set up the form with the Orderby property set to the field 'TestDate' and OrderByOnLoad set to True. This didn't work and the records were displayed in random order.
Next I tried setting up the form based on an SQL query with the field 'TestDate' sorted in Ascending order - same result. Tried this with OrderBy and OrderByOnLoad both set/unset as a pair and individually - always the same result.
How can I get the subform to display the test results in date order?
I have buttons that enable and disable editing/adding information on a continuous form.
When you click add the form then is set to allowadditions and shows you the * record. Is it possible to have that display at the top of the list instead of the bottom? If not, what would be the best method to move the focus to the new record when someone clicks add?
I have a combo box that contains the months. They appear in month order on the form but when I query, they are in alphabetical. How can I get this to be in month order on the query?
Initially I created a table with 11 rows. After completion of my project I added an extra of 480 rows to the main table. But the newly added rows are not coming in my subform.
Attached is my project.
Main : Main table (It consists of around 491 rows) MForm : Main Form (It shows of only 11 records which I was 1st created)
How to refresh my subform inorder to display all the rows.
A form with a text box expecting a date has the validation property as, >#1/1/2010# And Is Not Null. If a date is entered older that this the error is caught however if the field is left null it is not caught as an error. I have tried several modifications of this statement with the same results.
I did a search and i found a thread that seemed like it would answer my question but for some reason the attachment isnt working. :(
Okay heres the question..
I have a form and it contains 3 fields and 3 command buttons. When i hit the command button it uses a query to display the results. What i want to do is instead of having the results display in a new window, i would like it to display on the same form .. maybe on the bottom of it. Should i use a subform or listbox/combobox..
If there's a post out there that addresses this, please point me in that direction as I've had no luck.
I have my queries listed in a table. On my form I have them listed in my combo box. The user selects the query they want and hits the command button "Run". I would like to show the selected query in a subform on the main form and then give the user the option of selecting another command button to export the query to Excel.
I thought it would be as simple as setting the recordsource of the subform to the query name in my combo box, but that doesn't work.
Current code to run query in separate window:
Command button "Run" Private Sub Command9_Click() DoCmd.OpenQuery Me.Combo2.Column(1)
Attempt at getting what I want:
Privat Sub_Command9_Click() Forms!frmQuerySelection!sfrmQuery.Recordsource = Me.Combo2.Column(1) or perhaps sfrmQuery.Recordsource = Me.Combo2
I have created a query with parameters keyed in from unbound textboxes on a form. Does anyone know of a way to display the results (queried) in the sub-form of the same form (main) the textboxes reside? I have the query set up to create a table but when I use that table (or the query itself) in the subform I get the error message:
"The database engine could not lock table "tablename" because it is already in use by another person or process."
This seems appropriate because I am querying for results, but is there any way to get the results of a query into a form, rather than the more common pop up datasheet? I have tried several macros to open and close the tables - queries - copied tables ..re-opened forms....etc, but can't get it to work.
Thanks, for any help, I have spent some time on this one!!!
I have a main form which displays the results in the subform.
My requirement :
I have 1 main form and 2 subforms in that form.
I just wanted to have a get focus function on my 1st subform and needs to display the focusing result in the next 2nd subform.
In Detail :
I had a main form of search boxes Author, Published, title
If you search for 1999 in published text box then it will display all the results whose published year is 1999 along with those respective Author and Title in the 1st subform
In the result 1st subform if an ID is selected by the cursor then that entire row needs to be displayed in the next 2nd subform (As of now I wanted only 2 column details of the focussed result).
1st subform needs to display all the searched results (It was done and it works fine)
2nd subform needs to display the selected results (On Focus) of 1st subform.
How to deal with the 2nd subform linking up with the 1st subform.
Attached is the file. How to proceed further in getting done with the 2nd subform.
I have a main form which displays the results in the subform.
My requirement :
I have 1 main form and 2 subforms in that form.
I just wanted to have a get focus function on my 1st subform and needs to display the focusing result in the next 2nd subform.
In Detail :
I had a main form of search boxes Author, Published, title
If you search for 1999 in published text box then it will display all the results whose published year is 1999 along with those respective Author and Title in the 1st subform
In the result 1st subform if an ID is selected by the cursor then that entire row needs to be displayed in the next 2nd subform (As of now I wanted only 2 column details of the focussed result).
1st subform needs to display all the searched results (It was done and it works fine)
2nd subform needs to display the selected results (On Focus) of 1st subform.
How to deal with the 2nd subform linking up with the 1st subform.
I have a form with a subform (FindBuffer_Form) which I built from a Query (FindBuffer_Query) within the query criteria I have the following (Like "*" & [Select the main Batch Number] & "*")in order to search a particular number.
I want to be able to run the Query from a command button on the main form and have the results appear in the subform, If I have the Source object of the subform set to Query.FindBuffer_Query I get prompted twice to answer the Criteria before the form opens, after the form opens the subform is generated as per the search criteria.
Ideally, I want the form to open with no data in the subform run the query from command button and have the result in the subform.
I am trying to allow a calendar to search through a text box with a large amount of data in which will have headings using the date so i wanted to use a calendar search. Hopefully this will be be like the find function in word where you type (or in this case select a date) then click search or next which will take you to that specific date.
I am trying to allow end-users to only use buttons to navigate and display records in my database (so they don't know access is in the background) I have query that runs when they press a button but after they run it there is no way to get back to the main interface screen i.e. there is not a place to put another button and close the query. I was looking into creating a form to display the query results in datasheet view but it is not appearing the way I want. I inserted a subform and the results got better but I also do not like the way it displays because the user can see the subform, simple solution to get my data to display in the form so a user can view the results similar to datasheet view?
In my form I have a dropdown box. There are 7 values and based on the value it will run that query in sql server. I would like to have the query open in the form instead of opening up on a different tab. Currently on the command button click there are a bunch of if statements depending on what is selected on the combo box. Each value has a query associated with it because there are 7 different sql server DB's. The code is slightly different with each query.
I am not sure where to start or go about creating message box that would display "No results found" if my queries return no results. My search of the forums hasn't been fruitful.
I have created one form that has a text box and a button that works as a search function to run through the tables and displays the applicable queries. Currently, if no results are returned nothing happens. Preferably I would like a message box to display stating that there were "No results found". I would assume that the code would be associated with the "Find" button. Here is the VBA code as it stands, again, I haven't even attempted to add code for a message box.
Private Sub Find_Click() On Error GoTo Find_Click_Err
If DCount("Heading", "Service Desk Manual Query") > 0 Then DoCmd.OpenQuery "Service Desk Manual Query", acViewNormal, acReadOnly End If
im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this
tblCustomer - tblOrders - tblItems
and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this
i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.
my issue is i have multilble text box in my form & based on change in one of this text box i need the code to compare between data in the form & table & returm Msg if it is not matching. attached screen FYI.
i look in the internet but i could not figuer out the VBA code since i do not know VBA. what comes to my mind to to use select case.
I have a subform in which I display a table in Datasheet View. The problem is, I cannot figure out how to place the columns in the order (i.e. from left to right) I want.
For some reason, right-clicking on a column header in Form View and selecting Freeze Fields will shift that column to the left but I can find no consistent pattern to it and no other way of shifting a column. Reordering the columns in the table itself seems to have no effect on the order they appear on the subform and moving the controls around in the subform in Design View also seems to have no effect.
As you can see it consists of the name and a date of the backup. When it populates the combobox I want it to go in date order I newest to oldest. At the moment its going of the first number.
I have a basic DB for recording supplier records, you enter a supplier ID and it performs Dlookups to run and display query results on the same form. That part works fine.
I've added a subform and linked it to an existing query which returns the suppliers top selling lines and the query picks up the supplier from the ID field on the main form, however when I enter a new id the subform doesn't update with the results specific to that supplier.
So I think I need a way of getting the subform to re-run the query each time I update the supplier ID field, but I can't see an option for this in the subform properties.