How do I create a subform that shows query results of a search on the parent form? - forms

I'm quite new to MS Access but understand basic dvl concepts. I have a form (SalesOrder) where I can create sales order info. Creating a new sales order populates more than one table.
I'd like to have a two search buttons on the bottom of the form that will display the results of a query (search by customer name or order id). The results of the query need to be displayed in a subform, and once I click on the selected row, it should populate the master form fields with read-only data (i'll have an edit button to change to writable).
Do I simply link a query to the subform? If so, how do I do that? and how do get the event in the main form (the search button click event) to trigger action in the subform?
thanks in advance.
jeff

Related

Requery a subform within a tab control

I have several controls on this form in addition to a tab control with 3 separate pages. I want the subform(s) within each page to requery when a value is selected on the page above.
So for the purposes of explaining this..
I have an event On_Click() on a field called Address_ID. It's meant to take tha value of that ID in addition to two other IDs, Cust_ID and Location_ID, and requery the subform Order_Sub within the Orders page.
I've named the tab control pretty blandly, just tabCtl.
So far I've tried every way imaginable to reference the subform, but to no avail.
Forms!Record_Details!Orders!Orders_Sub.Requery
That doesn't work, but I assume that it should. What gives?
Steve
You do not need to reference the tab control in your code. Just reference and requery the subform itself
Forms.Record_Details.Form.Orders_Sub.Requery

sharepoint online, set edit item view as default instead new item view

I am working in a small SharePoint project to let school students pre-order the lunch online.
the main idea is the student can login to a school site, fill an order form.
I try use a list form to do it, just simply put a InfoPath form as web part on the home page.
When students open the site, he can fill the order form directly.
but the problem is the default view of this web part is always the new item form. so when a student already make the order, then login to site again,
how can I let him see his order and edit it instead a new order form.
another way may be use the form library, but i don't know how can i transfer the filed from the form to a list. because at last we still need a list instead a bunch of documents to get the summary of order.
Thank you for help.
Perhaps you can use a custom list and show that on the homepage?
A 'custom list' by default only has a title column but by adding more columns through the list settings you automatically add form fields on its new item form.
Since you are creating an order form you might want to hide the title column. Go to the settings of the list, then advanced settings, allow editing of content types. Then back in the list settings click the 'item' content type, then the title column then click the radio button for hidden.

View details control on ax 2012 form

I would like to bring view details button in my form when right clicked on my form view details should be shown like in standard any form for example when we right click on item number field on the form we have view details option when clicked that opens the details form of that item.
I tried using the normal right click method but could not succeed, please help me how to bring the view details functionality in my custom form.
To have the "View details" standard context menu, the following must be true:
The foreign key (FK) must have a relation defined on the table of the key
The table pointed to by the FK must have a form
The form must have a display menu item
The menu item must have the same name as the table or the FormRef property must be set
The menu item must have security set up, and the user must have read access (or better)
Running the Best Practice check will usually spot the errors.
This blog entry explains it nicely.
You have to create Display Menu Item with the selected form.
Then you can set newly created menu item for the FormRef property of the Table.

Restore "Continuous" form behavior in MS Access after subform is added

I created an Organization form in Access 2007 that could be used to display any record in the Organization table by clicking the navigation buttons that appear at the bottom of the form when it is in "Form View". Next, I created a subform within the Organization form to display records from another table that have a foreign key from the Organization table.
Now the "Default View" property of the Organization form has been automatically set to "Single Form" and when I try to set it to "Continuous Forms" I get the following message:
You can't view a form as a continuous form if it contains a subform, an ActiveX control, or a bound chart.
Set the DefaultView property of the form to Single Form, Datasheet,
PivotTable, or PivotChart.
Furthermore, I am unable to use the form to view any records other than the first record in the Organization table. How can display other records from the Organization table in my form using record IDs?
While investigating this problem, I discovered that Microsoft's own Northwind Traders Sample Database contains at least one form with subforms that exhibited the behavior I wanted, even in the "Single Form" view. This suggested that the subform was not the cause of the problem.
In trying to reproduce the affect accomplished in the sample database, I recreated my form and re-added elements too it one-by-one, testing the navigation at each step. I was able to view different records via the "Form View" navigation button until I added controls from a table other than Organization that weren't contained within a subform.
So there you have it; switching between a form's source records via the navigation controls in "Form View" does not work when the master form contains records from more than one table.

Display Additional Form on Update - RadGrid

I'm using a RadGrid for changing record status's. Users have the ability to select a status from a dropdown and update that record with that status. Depending on the status chosen, when the user clicks update I want to popup an additional form so the user can fill out more data required for the update. I'm not sure the best way to go about implementing this. Any suggestions are appreciated.
One way is to use the RadWindow like a modal and pop it up to the user via client-side JavaScript. We use RadWindows in our applications and it works. Or, the RadWindow supports a Nested Grid or View that you can have as a record's child; so you can have the master record, click on the arrow on the left and expand the record to view a nested grid of data, or a custom view (via the NestedViewTemplate property). You can also have the form in a DIV, hide it, then show it via JavaScript too.
Those are two ways.
HTH.