Forms :: Requery Form And Subform After Popup Form Close

Aug 19, 2013

I tried all sorts of permutations of the requery command but apparently I'm too dense to figure it out.

Form 1
subform 1 > button to open pop up form
subform 2
subform 3

I'm trying to requery a combo box (inside of subform 1) based on a table that is updated from the pop up form.

On pop up form close, what's the correct syntax for re-querying subform 1?

View Replies


ADVERTISEMENT

Forms :: Update / Requery Subform Through On Close Event Of Another Form

Aug 2, 2013

I am working with 2 forms and a subform.

frmTaskTracker -subfrmInbox (Datasheet View - based on a query)

frmUpdateInboxItem

subfrmInbox displays a summary of tasks on a task list. The user navigates to frmUpdateInboxItem from frmTaskTracker. After updating a record from frmUpdateInboxItem, it is possible that it the record in question will no longer meet the requirements to have it listed on subfrmInbox.

I have attempted to add code to the on close event of frmUpdateInboxItem to requery the sub form on frmTaskTracker but am not getting the syntax correct.

correct my code? Alternatively is there is a more correct way to do this, I'd be happy to learn it.

Code:
Option Compare Database
Private Sub cmdClose_Click()
Me.[frmTasktracker]![subfrmInbox].Requery
DoCmd.Close acForm, "frmUpdateInboxItem"
End Sub

View 5 Replies View Related

Forms :: Requery Subform After Exiting Popup

Aug 3, 2014

I have my main form which is f_main.

On there is a Subform called subfrmFront and that has a source object of the form f_front

A button on f_main opens up a popup. In this popup, the fields I am updating all relate to the same records that are being displayed in the subform. Everything updates OK in the popup (i.e I can see in the table that the updated information is in there), but the subform back on f_main still has the old data in it.

I need to requery that subform to show the new data I just inputted.

If I close f_main and re-open it, the latest data is in there, but surely there is a way to make sure it updates on the close of the popup form.

View 14 Replies View Related

Prevent Form From Displaying New Record And Save It When Form Requery Or Close

Aug 26, 2014

I have a split form that's like a list of pending tasks. The data source is a linked SharePoint 2013 list where users submit requests. The user takes the information from each record and performs an action. When it is done, the user presses a button and the task status changes from "Pending" to "Processed". The form record source is based on a query that finds only records with a status of "Pending" so when the user changes the status of the task, it is removed from the list. It works fine except when there is only one task left in the work list. If the user processes the last task, the form refreshes and it goes to a new empty record and I get an error message that says I must enter a value into one of the required fields. I tried making the field non-required but it just creates an empty record in the table.

View 3 Replies View Related

Close Popup Menu Form

Sep 17, 2006

I've created a popup menu form to be loaded when you cick on another form. I need to know how to get the popup menu form to close when you click off it. I've tried using lostfocus and deactivate but that didn't work. Modal is set to no. What code should i use and where would it go?

View 8 Replies View Related

Forms :: Filter A Popup Form With Subform?

Jul 29, 2015

I have a continuous Form [Letter Log - All] with "LetterNo" field as the primary key. What i want to do is click the "LetterNo" and a filtered pop up form with subform should appear based on what has been clicked. But i don't have luck doing that. The name of the main form is "LetterLog" and its subform control name is "LetterLogSub"

here is what i did.

Code:

Private Sub LetterNo_Click()
'DoCmd.OpenForm "LetterLogSub", acNormal, , "LetterNo = " & Me.LetterNo, acFormEdit, acDialog <-- this one works but without the subform
'DoCmd.OpenForm "LetterLog", acNormal, , "Forms!LetterLog!LeteterLogSub.Form.LetterNo = " & Me.LetterNo, acFormEdit, acDialog
'DoCmd.OpenForm "LetterLog", acNormal, "LetterNo", "me.LetterLogSub.Form!LetterNo = " & Me.LetterNo, acFormReadOnly, acDialog
DoCmd.OpenForm "LetterLog", acNormal, "LetterNoFilter", "Forms!LetterLog!LetterLogSub.form!LetterNo = " & Me.LetterNo, acFormEdit, acDialog
End Sub

View 7 Replies View Related

Forms :: Change A Subform To A Popup Form

Sep 24, 2013

I had a subform to enter payments. It worked well. The master and child fields linked well and all the necessary data appended to a new record in the payments table.

Now to make it more user friendly, I changed the subform to a popup form (The 2 forms took up too much real estate on the screen).I deleted the payments subform and created a command button to open the payments form as a popup.

I need 3 fields on the payments form to be populated from the edit sponsor form (sponsorID, MemberID, SponsorTypeID) and then payment details to be entered and posted to a new record in the payments table.Since I've changed the payment form from a subform to a popup form, the master/child relationships are gone and the 3 fields I need for the payment record no longer appear.

View 1 Replies View Related

Forms: Requery A Subform From Another Form

Apr 18, 2005

I need to requery a subform from a third form and can't seem to get it to work.

frmForm1 has frmAddress as a subform. The button cmdReviseAddress opens the form frmUpdateAddress where all of my validation work is done and the new record is added.

However, the new address is not being displayed in the subform.

If I use the command
Forms![frmTest]![frmAddress].Requery
it works fine.

The problem is that I want to be able to frmAddress on any form, and need to pass the name of the main form (in this case frmForm1) as a variable.

If lsTemp = "frmForm1", the statement
Forms![lsTemp]![frmAddress].Requery (and every variation using brackets and quotes that I can think of) fails.

Any ideas?

Thanks!

View 3 Replies View Related

CTRL W Shortcut (to Close Form Window) Not Working With Popup

Nov 28, 2011

As the title says, ctrl-W works on all my other forms but not on the one which has Pop-up set to "Yes".

View 1 Replies View Related

Forms :: Requery A Control On A Form Pulled From Subform

Feb 6, 2014

how do you requery a control on a form pulled from subform? i've tried but it doesnt work

Private Sub Form_AfterUpdate()
[Forms]![Project_Details]![subform].[Form]![Text119].Requery
End Sub

View 6 Replies View Related

Forms :: Requery Control On Subform From Main Form - Refresh List?

Sep 8, 2014

I have a form called Add New Delegation, i have combo box of Institution names on the main form and a subform for Agreements discussed. with a combo box called agreements. I successfully cascaded the combo boxes so that the agreements discussed on the subform are filtered by their respective institutions on the main form. However i am unable to refresh the list each time a new institution is selected as the Macro will not allow me to requery a control on the mainform from the subform..

View 2 Replies View Related

Forms :: Create New Record In Form - How To Requery Subform To Link Properly

Apr 2, 2013

I have a form (frmAddManifest) with a subform (subfrmManifestTransporters).

When creating a new record, I can enter data into frmAddManifest, but the subform doesn't update to link with the record - I presume it's because the record from the main form hasn't been completed yet.

Is there a way to requery the form and/or subform so it stays on the record I was working on, and link the subform properly?

View 4 Replies View Related

Subform With A Popup Form

Dec 6, 2005

I can't seem to get this to work. I have a Mainfrm with a Subfrm. On the Subfrm I have a field that has to be a concatenation of two inputs. To do this I have created a PopUpfrm for that field that has two list boxes. The user then chooses one from ListA and one from ListB. This populates an unbound field (fldCode) on the PopUpfrm. I need to pass this data to the original field on the Subfrm.

I've tried:
Forms!Mainfrm!Subfrm.Form.Field1 = me.fldCode
and every possible iteration of this that I can figure out.

Any suggestions on how to pass this information back to the Subfrm.Field1?

If I run just the Subfrm, w/o opening the Mainfrm everything works great. I guess I just don't know how to reference that field when it is actually in the Mainfrm.

Thanks in advance

View 7 Replies View Related

Requery Subform From Another Subform Both Connected To Main Form

Aug 8, 2014

I have a main form that has two subforms, subform1 and subform2, both connected to the main form. When I enter data into a field in subform1 I want subform2 to requery and update to show the calculated results from the new or changed data in subform1.

I found that if I do a refresh it works when changing the data but not when entering a new line of data in subform1. I tried some code in the after update field of on subform1, but cannot seem to get anything to work.

Me.[subform2].Form.Requery

Does not work. It errors and says it cannot recognize subform2 as a field. I have tried a field name on subform2 but I still got the same error.

View 1 Replies View Related

Making Subform Field Value Available To Popup Form

Mar 6, 2015

In my Student Administration database I am trying to launch a popup form from a sub-form of a Job Positions and Seekers form. The sub form is actually one of 2 sub-forms, both Continuous Forms default view, on a form linked via an unbound control (MasterJobPosID).

The first sub-form is called and lists open Job Positions and the 2nd sub form is called and lists all Students Seeking each of the positions. The Students Seeking subform is linked to the unbound control MasterJobPosID in the main form which is set to equal the Job Positions subform's JobPosRecNo field which is the key to the Job Positions table.

The popup form is called Job Employment and is being launched via an event macro from the Students Seeking subform. It will allow the user to create a record in the Job Employment table. The event macro has a Where statement that says "=JobPositionID And Student", an attempt to link it to both the Job Position record being filled and the Student filling it.

I am able to populate the popup form's fields in expressions setting Default Values equal to fields on the loaded Job Positions subform and the Student from the Students Seeking subform. What I am unable to get is the Job Position record key from any of the 3 fields it appears in on the Job Positions and Seekers form:

MasterJobPosID on the main form.JobPosRecNo on the Job Positions sub form.JobPositionID on the Students Seeking subform.

I want that to link the new Job employment record to the Job Position record the student is filling. In fact I get a parameter prompt for JobPositionID when the popup form is launched.

View 4 Replies View Related

SubForm Requery From Seperate Form

Aug 11, 2005

Hi. Having a bit of a problem getting a subform to requery/refresh after running a query from a seperate form. The seperate form is acting as a 'search form' and running query qSearch.

I've tried various things (requery the form, subform etc) but here is the code I'm currently using:

Private Sub RunqSearch_Click()
DoCmd.OpenForm "Papers"
Forms.Papers.RecordSource = "qSearch"
Forms.Papers!Authors.Form.RecordSource = "qSearch"
Forms.Papers!Authors.Form!AuthorName.ControlSource = "qSearch.AuthorName"
Forms.Papers!Authors.Form.Requery
Forms.Papers.Requery
DoCmd.Close acForm, Me.Name
End Sub

The main form is requerying fine, but the subform isn't. Any help would be appreciated. Thanks

View 4 Replies View Related

Modules & VBA :: Requery A Subform From Another Form?

Jun 26, 2013

I have a subform in a tab within a mainform. Within the tab there is a button to open a form to delete/add data to the subform. So upon closing this pop up form I want to update the subform to show what has been deleted or added, I have tried the various things to requery the subform but none of it seems to work, here is what I have tried;

Code:
Forms!frm_Capex_Submission!frm_CapexSignatures.Requery

I assumed this would work but evidently not...

I have also tried;

Code:
Forms!frm_Capex_Submission!frm_CapexSignatures.Form.Requery

and;

Code:
Forms!frm_Capex_Submission!frm_CapexSignatures.refresh

View 2 Replies View Related

Opening Popup Form With Current Subform Record

Sep 7, 2005

Hello,

I am trying to run a macro on doubleclick in a subform (dataview) that will open the same record in a popup form (tabular).

I've enter in the macro Where Condition the following statement to only show the record I doubleclicked on in the popup. The only problem is it's asking me for a parameter value for the LogID. Its apparently not picking up the LogID I doubleclicked on. Is there any way I can fine-tune this WHere statement so that it knows the record LogID I clicked on. (The pop up form should show only the same record).

[LogID]=[Forms]![CommunicationLog Subform]![LogID]

View 1 Replies View Related

Forms :: Button In Popup Form - Set Focus To Another Form?

Jan 28, 2015

How can I make a button in a pop-up form to send enter key to a text box in another form? Do I need to set focus to the other form first? And how?

View 1 Replies View Related

Forms :: Pre-populate Popup Form After Update To Another Form

Aug 27, 2013

I have two tables - Interviews & Placements.these tables have multiple foreign keys which pull information from other tables (CandidateID,ClientID etc). I have designed queries and forms (datasheet view) which display all the values that I need, For example:

The interview form shows the following fields:
CandidateName;Company;consultant;1stInterviewDate; 2ndInterviewDate;Offer;Accepted

the placements form shows the following fields:
PlacedCandidate;Company;Consultant;PlacementDate;F ee;

This query "qry_Interviews" populates these forms using the foreign keys:

CandidateID from candidates table
CompanyID from companies table
consultant from consultants table

Ideally what I'd like to happen, is when the "accepted" field is updated on the interviews form, the placements form opens as a pop up and is auto populated with the values (CandidateName;Company & consultant).So far I have tried setting the value directly, i.e on the "on Open" event of the Placements form I entered:

Me.Txtcontactname = Forms!ISISnavigationMain!navigationSubform.Form!DS .Name

This does not work. Should I be populating the placements form with the actual Foreign key values rather than the resolved names? Ideally I'd want the pop up placements form to display the actual names rather than just ID numbers.

View 4 Replies View Related

Close Master Form From Subform??

May 13, 2005

Hi,

I have a form with a subform. In the subform (based on a different form) I need a button to close the master form. In the subform I need to find out what the master form is so I can close it. Since I use the same subform in multiple forms I can't really hard code the name of the master form.

Can someone help me?
Thx
Luke

View 1 Replies View Related

Modules & VBA :: Subform Requery Not Working On Form Open

Apr 3, 2014

I have a form with two subforms. One subform is a datasheet that pulls data from a temp table. During the other subforms Form_Current, the temp table is emptied (DoCmd.RunSQL "Delete from tblAddRefs"), reloaded with data relevent to the current record, and requeried (Forms("frmEDFP").Controls("tblAddRefs subform").Requery). This works like I want it to...

With the exception of the initial load of the main form. The subform based on a table shows (#Deleted) instead of data. if I step through the code, I can see that the temp table is emptied and repopulated by the time I try to requery the subform. This is still happening during the Form_Current of the other subform, which is successfully running on main form load.

If I requery (Forms("frmEDFP").Controls("tblAddRefs subform").Requery) using a button on the main form once it is loaded, the #deleted data is correctly is replaced by regular data, so it's like the requery in the Form_Current event isn't doing anything during load.

View 2 Replies View Related

General :: Unable To Close A Form With Subform

May 30, 2015

I am trying to close a form with a subform.

I enter data in the main form and then the subform.

The main form has a save btn with an on click event which includes at the end of code

If Me.Dirty then
Me.Dirty = false
DoCmd.Close
DoCmd.OpenForm "FormName"

However the Form will only close and open the required form if I remove the two "Dirty" Code lines.

I am obviously trying to ensure that the data is saved on both the main and subforms using the If Me.Dirty......code

View 7 Replies View Related

Forms :: Requery Form After Making Changes In Another Form

Sep 17, 2014

I have a form that shows a companies engagement with our company. If someone wants to edit the details of that company (address phone number etc...), they click the "edit" button, which then opens a form where edits can be performed.

After the edits are done, the user clicks a save and close button which runs docmd.runcommand acCmdSaveRecord, and returns to the companies engagement form.

When I return to the company engagement form, I would like to see the companies information reflect the changes that I just made. Currently, I can only do this by exiting the form and re-opening. I have tried using Me.Requery in the OnGotFocus, Activate and Current events to no avail.

I should mention that I have a company combo box with multiple columns that are used to display address, postal code, etc... in textboxes on the same form.

View 1 Replies View Related

Forms :: Display Value Of Control Within Popup Form

Jul 25, 2013

I have a main form bound to a query. Within that form, I have a button which calls up another form (pop up form). I simply want value of the "claim#" field-control to display in the "claim#" field-control of the pop-up form.

View 4 Replies View Related

Forms :: Size Of Modal Popup Form

Aug 27, 2014

I am having issues with a split form which modal and emergent (pop-up) properties are set to yes. When I open it, it is maximized or out of the size I had setup; although I saved it trying to "freeze" the height and width.

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved