Modal right choice for quick filter query form?
Questions: can you access form fields on the parent form?
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Here is the code:
Private Sub Frame24_AfterUpdate()
Select Case Frame24
DoCmd.OpenForm "frm400Q1", acNormal
The modal form opens.it is after I input the data, it is not carrying over to the table.what I did was for the questions in the modal form I dropped into a separate query and based the record source of the modal on the query
I have managed to do it for a report but I dont know where to add vba codes in for a query
Basically I've got a main form with a datasheet subform which is not editable which has a Primary key and a foreign key columns in it. The only way to add some data to this datasheet view form is by clickin' a cmd Button.
Once I click the button a Modal Dialog form appears and then the user selects or enters the details in it which then gets appended to the table.
I've made this Modal Dialog form to go to new record every time it loads but I am wondering if there is a way to link it to the main form I mean when I click the cmd button I want this modal form to appear but want the foreign key to be selected by default.
I hope I've managed to phrase my query properly
To break it down further: I have added a function where the user can show the last 30/90/180/all days on split form with the datasheet on the bottom. This function uses the filter property to grab the last month/3 months/6 months/ or all records.
Would it be best to change a variable within the underlying query instead of using the filtering?
I only ask because I am working over a VPN right now and I noticed that the form was slow to load and I was thinking of what would be fastest.
e.g. I have a modal form called "DatesForm" and I invoke it as follows:
How do I reference the modal result and the fields on the form (what syntax do I use) ?
I want to set the value of a text box called CompanyText, on the form.
Private Sub lookupitemsbutton_Click()
DoCmd.OpenForm "itemqueryform2", , , , , acDialog
I want it to open in a Dialog window, with the modal property set to No so that my user can switch easily between the dialog and the form she is using underneath.
In the properties panel, I selected Popup YES and Modal NO, but my form still does not allow users to click out of it without closing the form.
The form shows the default MealItems set for production. At the last minute the end user may need to select an alternate meal item, and substitute corn for green beans.
I have it set up so that the end user double clicks on the ItemName field on the data sheet and that opens a modal form with a query behind it.
I want the query behind the modal form to pick up the Meal3ID which is the primary key of the table behind the data sheet. and pull that record from the underlying table Tbl_ScheduledMealItems and display the fields on the modal form.
Everything works fine except:
The double click only calls up the first record in the underlying table. It does not pull up the active record (The one the end user clicked on.)
How can I make my double click on the ItemName field capture the Active Record clicked on and pull up that specific record in my Modal form
My Form is: frmReview
My ComboBox is: cmbGLimpact
The RowSource is: SELECT DISTINCT [GLimpact] FROM Initiatives UNION SELECT Null As AllChoice FROM Initiatives ORDER BY [GLimpact] DESC;
The Query Criteria is: [Forms]![frmReview]![GLimpact]
The field values are: Yes, No & TBD
The filter works fine for Yes, No & TBD, but the blank choice doesn't return all records.
I need to be able to setup several filter ComboBoxes to enable filtering on several different fields. So, depending on which ComboBox filter (field) the user wants to filter on, the otherswill allow all records to be returned.
2) Filter On Load (I have this one set to YES)
I have a Query defined that I'll like to use as a filter when the form opens. How can I do this. And, no I don't want to change the record source to the form because I'd like to retainthe ability to remove the filter when the form is open to get back to all records.
I'm using Access 2010