Refreshing A Form From A Second Form (not Subforms)

Mar 5, 2005

i need to be able to refresh the data on a form, when i click a button in a second form.

the onclick events runs some sql that alters the data that form a is based on, then closes form b. The changes are not reflected on form a until the form is reopened or i use a button on the form a to refresh.

is there anyway to achieve this? surely there must be an easier way than closing a form and reopening?

thankyou.

View Replies


ADVERTISEMENT

Refreshing Subforms

Nov 22, 2005

Hi there.
I have a form with two sub forms on it. The form loads with a reference number that I pass to a function that in turn requeries the first sub form. The function call is in the on load event of the main form.
This part works fine.
The second sub form uses a similar requery function to the first one. The only difference is that the query for the second sub form is based on a reference number from the selected record in the first sub form.
If I put the function call for the second sub form in the on click of the first one all is well and the second sub form displays all records with a matching reference number.

The problem is that when the main form loads the first sub form will display the correct data but the second remains blank or displays the wrong data.
I know this is happening because the first sub form has not loaded fully and so the second sub form cannot get the reference number. I just can’t find a way to make the second sub form display the correct data when the main form loads.

I have tried calling the requery function for the second sub form from most of the events on the main form and many of the events on the first sub form but to no avail.
I also tried putting a meaningless sub form at the bottom of the main form and putting the requery function for the second sub form in the on load event but that was no good either. This surprised me as until that point I was assuming that access was loading the sub forms sequentially from top to bottom.

Can anyone tell me how I might determine the point at which the first sub form has been loaded so that I can get access to the reference numbers needed for the second sub form query. I would prefer not to use a timer for this as there is no way to determine the maximum time it will take access to load the rest of the data but at present it looks like the only option left.

Any comments would be much appreciated and sorry for the lengthy explanation.

View 6 Replies View Related

Forms :: Refreshing Navigation Subforms

Sep 15, 2014

I have a navigation form with two tabs. One tab contains a subform for a technician to enter several part request. The other tab is for the parts room to edit and update the request.The issue i am having is i need the parts room form to be requeried every time the technician enters information on his tab.

I added a command button and tried

[NavigationSubform].Form![FRM New Request Part Room] .Requery

but it can't locate this form since it is in a separate tab.how do i do this?

View 1 Replies View Related

How To Link Subforms To Other Subforms On An Unbound Form

Feb 4, 2006

I forum could someone tell me:

I have an unbound form on that form I want to put three sub forms one on a products table the other on a course start dates table and the link table that joins the other two together. all three are related to each other with Pk/FK links.

When I try to link them it says you cannot link items on an unbound form.

regards in advance
Peter:eek:

View 1 Replies View Related

Refreshing A Form

Feb 24, 2005

I have an orders form which contains an items subform.

To populate the items subform I have a button which opens a separate pop-up form.

Is there a piece of code which would allow me to click a button on that pop-up form which actually refreshes the other opened form (orders form)???

Anyone know if this is possible?

Thanks,

Paul.

View 2 Replies View Related

Refreshing Form - Please Help

Dec 8, 2005

Hi

I double click a combo box which takes me to a new form. e.g. a purchase order form does not have an employee so they need to be added. When the employee form is closed i would like to refresh to combo box so the new employee appears in the combo box.

Please help

Thank you

View 3 Replies View Related

Refreshing A Form

Sep 19, 2006

Hi all,
How are you?
I have a small problem...
I have a form with 3 textboxes and 1 button. When filling these textboxes, and clicking the button, a record will be added to a table. I want when I click the button, the record to be added to the table with removing the the old record from the 3 textboxes for the new record to be added.

How can I do that??

View 3 Replies View Related

Refreshing A Form

Mar 2, 2006

I have some dLookUp text boxes on a form. They don't refresh though till after I change the record I am on. There are only two fields on the form that actually change the dLookUp boxes and they are both combo boxes.

Is there some refresh code I can put in the combo boxes so that the form refreshes after someone changes data in the two combo boxes?

View 3 Replies View Related

Form Keeps Loading/refreshing

Apr 11, 2006

Hi all,

I encountered some weird symptons with my Access forms. I am using the form to display images(done by setting the OnCurrent and After Update property).

When my PC is just powered on, and i try to load say form "ENGLISH". Form "ENGLISH" will appear, but the focus will switch in between form ENGLISH and the MS ACCESS program window. This action will onli settle down after abt 10 secs.

When the ENGLISH form is loaded, i will attempt to switch from one record to another, but the same thing occurs again. IT will load/refresh for abt 10seconds, with the focus toggling btwn ENGLISH FORM n MS Access.. IN addition, it opens a second copy of FORM "ENGLISH" in the background as can be seen on my taskbar. When i close my 1st form ENGLISH and i attempt to close the 2nd FORM tat is appearing on the taskbar, there will be an error msg, English : MSACCESS.EXE-Application Error, Instruction at....(refer to the attached jpeg file for detailed error location)

Y is it tat this weird behaviour onli applies to the forms tat are used to display images but not those normal forms tat contains of purely text?

The entire behaviour will be eliminated after i close MS access, and reload the DB abt twice.....

View 3 Replies View Related

Refreshing A Form On Click

Jul 27, 2005

I have a form that has a status, and a button that changes that status when clicked. This should remove the record from the current form and put it in another.

Is there anyway I can refresh the form after that button is clicked to show the record actually dissapearing instead of having to close/reopen the form?

View 2 Replies View Related

Form Not Refreshing After Submit

Jul 31, 2006

Hi,

I have a form, that has some text fields and a couple calendars for the user to select the dates from.


What I would like to happen is, after the user enteres the data, and they hit submit. I want the form to go back to a new entry, but it's not quite doing this.

The data they type in dissapears after submit, but the calendars seem to hold whatever date they used. And when they try and enter another entry, they can't select the same date as before. They have to hit a different date first, before it allows them to re-enter the same day.

Anyone know why? Is there a way to make the form refresh, or reload after they hit submit? So it will allow them to enter something for the same day?

thanks
chris.

View 3 Replies View Related

Requerying / Refreshing After Form Is Closed.

Sep 25, 2005

Hi all,

I am stumped as to how to get a form to update/refresh. Heres what I have!
My main form:[Daily Log From] is opened, with a subform:[DailyDSQry subform] populated by a Query. This form has a command button that opens another form: [NewDSLog] in "acAdd","acDialog".
What I need is: when the [NewDSLog] form closes, the [DailyDSQry Subform] needs to requery/update so that it displays the new entry.

I have tried the following in a command "CLOSE" button in form [NewDSLog]:
docmd.Runcommand AcCmdRecordSave
Me!Forms![Daily Log]![DailyDSQry subform].Refesh
Me!Forms![DailyDSQry subform].[Query].!Requery
doCmd.close

but no LUCK.....Keep getting errors
Any Ideas
Thanks all, I do appreciate the help
Enviva

View 1 Replies View Related

Refreshing Form After Deleting From Subform

Apr 27, 2006

Hopefully a quick one, this.

I have a form containing a subform, as a datasheet. The form displays the full details of whichever record I select in the subform.

When I click on a button to delete a record that I've selected in the subform, it vanishes and the subform row that displayed it is cleared. I have a figure displaying the total count of rows in the subform (thanks to Ghudson for that one) and this also reflects the change. the form, however, still displays the details it previously did.

As the last line in the code behind the button I have:

[Forms]![form name].Requery

however, when the code runs and hits this line, it displays a message that says

'Runtime Error 3167: Record is deleted'

Without this line, the form doesn't refresh (obviously) and I get no error messages, but when I next select any row in the subform I get a message:

'Record is Deleted'

and all the fields in the form display 'Deleted#'. Selecting another row fixes the problem.

It seems pretty clear that I'm not refreshing the form correctly, but in spite of searching the forum and finding a fair few threads on this topic I can't work out the syntax I should be using.

Hopefully, someone more knowledgable tham me can point me in the right direction.

View 1 Replies View Related

Printing Report Without Refreshing The Form

Jul 27, 2006

Okay, here is the situation that is slowly driving me crazy.Form: Clients ACTIVESubform: Clients ACTIVE - closureReport: Clients ACTIVE - closure (created by a save as by the subform)My database was created to keep track of clients in a centre. The clients files are eventually closed by a checkbox. Then a number of reasons are inputted in as for why the file is now closed by means of a combo box (lost contact, graduated, etc). After the files are closed, the users want to print a simple one-page report that they can put in their manual (paper) file. I created a subform that allows the users to preview what will be on the resulting report. I also created a button that they can click to print the report.NOW for the problem,The report will not show the new information (closed checkbox = yes, reason for closure, notes about closure, etc). I can't refresh because then the client no longer shows up in the form as it only includes ACTIVE aka open files aka Closed=No.Here is my coding for the button that I have:Private Sub Closure_Click()On Error GoTo Err_Printable_Click Dim stDocName As String stDocName = "Clients ACTIVE - closure" stLinkCriteria = "[StudentNumber]=" & "'" & Me![StudentNumber] & "'" DoCmd.OpenReport stDocName, acNormal, , stLinkCriteria Exit_Printable_Click: Exit SubErr_Printable_Click: MsgBox Err.Description Resume Exit_Printable_ClickEnd SubHELP ANYONE??? :) My only idea is to do this is something like where is matches the student numbers, refreshes the form, and prints the report. BUT no matter where I put the refresh or requery command, it doesn't work. It ends up printing a blank report as it can not find the student number in the ACTIVE form as the client is now closed.

View 1 Replies View Related

Write Conflict From Refreshing Form.....

Dec 5, 2007

I have a form that runs a macro that refreshes by doing

Goto Record Next
Goto Record Previous

which generally works fine. But if I change combo box values a few times I get the following error message (titled "Write Conflict"):



Is this a refresh issue, or should I be looking for something else?

View 2 Replies View Related

Forms :: Field On Form Not Refreshing Until Tab Is Switched

Feb 12, 2014

I've got a form built on a tab control. The form is a sales order form with multiple tabs. One of the tabs is used to enter shipping information and cost. The problem I'm having is:

A field I have added to this tab which is a stored total of the sales order total plus the shipping charge is not showing up after I enter the shipping charge until I switch tabs and return back to the shipping tab.

It's been a while since I've dealt with these refreshing problems. Which event is happening when a tab control is switched so I can call it to trigger my field total?

Btw, the shipping information on that tab is a subform.

View 1 Replies View Related

Forms :: Auto Refreshing Form Every X Seconds / Minutes?

Oct 8, 2014

One of the directors of the company I work for would like to have a large screen display the current status of jobs that my database stores. To cut a long story short the table he is interested in is called tblJobsLogging and is updated manually by our laboratory on a regular basis as jobs are completed using a form linked to a query in turn linked to that table.

Think fast food chain order monitor. He wants to be able to look up from his desk and see the progress directly in front of him at any point.

Is there any way that I can have an access form displaying these records in a datasheet view which continuously refreshes every X seconds / minutes or updates as a record is updated in the underlying table?

View 2 Replies View Related

Forms :: Refreshing Table Form Through Search Function

Apr 7, 2015

I am having some minor issues with my current database. The way it works currently is having a MainMenu where you can either go to customers/ ProductList/ Product OR ProductList straight away. I have a CustomerT and a ProductT. I have made a Query where I link the two tabels to have the feature showing the customer to the specific product with the criteria: "Kunde: [CustomerName] & " " & [Subsidiary]" on the form I have a txtsearch (Textbox) connected to a button with this coding:

Private Sub Kommandoknap49_Click()
Dim strsearch As String
Dim strText As String
If (Len(txtsearch.Value) > 0) Then
strText = Me.txtsearch.Value

[code]....

This allows me to search for text in each of the boxes with information on the single product(s) for example searching for Kunde (Customer in Danish) or ProduktNavn (Name of product) HOWEVER when I do this the "Kunde" turns into "#Navn?" c..If i reopen the Form it will show with the right information. I also tried to code the "Byactivation" to

PHP Code:

Forms!ProduktListeMainMenuF.Requery 

View 2 Replies View Related

Form Containing 2 Subforms

Aug 10, 2006

Hi all, I have a form wich contains 2 subforms, these subforms are runned by a query wich selects data between a range of dates, the problem is when i open the form it will ask me the range of dates twice, once for one subform and then again for the other, as the range of dates are the same for both subforms is there a way to open the form typing only once the range of dates?
Thanks
Marco

View 2 Replies View Related

Form With TreeView And Subforms

Feb 4, 2005

Hello all.

I'm really new at VB.
But I'm learning. I'm also learning to work around access too.
What I'm trying to do is have a Form with a TreeViewCtl that acts as a menu for other forms.
I'd like to have the TreeViewCtl open those forms in a subform so there is always just one form open at all times.
This way my "clients" don't get lost in the forms. Believe me, they get lost easily...

I already posted a question like this here:
http://www.access-programmers.co.uk/forums/showthread.php?t=80756
But I'm not sure if this is a VB question (TreeViewCtl) or a Forums question...
A sample of what I'm trying to do is available at the link.
My TreeViewCtl works fine, but the forms open in seperate forms.
Sorry for the dbl-post.

Does anyone have any ideas?
I've been searching google for 2 weeks without any answers.

Thx for your time.

View 1 Replies View Related

Using Sum On Two Subforms For Main Form

Apr 12, 2005

hi

i have a stock control db. when new stock is ordered it updates 'units on orders' field, then when goods are recieved the subform field is updated and this automatically updates the 'units on hand field'.

i then have another subform for stock going in and out, i would like to be able to have the units on hand field as above (which is the main form) automatically updated like is when using the the goods recieved sub form??

not sure if i explained it properly but i can send the structure if that helps?

many thanks

View 1 Replies View Related

Set Focus On A Form With 4 Subforms

Jun 10, 2005

My main form has four command buttons that when clicked will make visible one of four subforms.

I can switch freely about the subforms by clicking on each of the buttons. However, when I place the cursor in a subform(and thus give it Focus), and then attempt to select another button to open another subform, I get the dreaded "can't hide a control that has the focus" error message.

What type of code should I use and where exactly should I be putting it?

I've tried setting focus to another subform in the OnClick event of my buttons, but that doesn't seem to be working.

View 2 Replies View Related

Form And Two Subforms Calculations

Feb 5, 2006

I have a problem with main form and two subforms in it. Both subforms are in "continuos" mode, and each of them has field in footer, where it calculates total sum for all field that are in it.

Then there is main sum below both subforms (all this is in detail section of form) and it calculates total for both sums of each subform.

Whenever i fill values in first subform and in second subform, i have results everywhere, but if i fill values in first subform but leave second subform empty, the "main sum" below both subforms is empty also....

The control source for main sum field is "=Forms!frmMainForm!frmSubform1!Text1 + Forms!frmMainForm!frmSubform2!Text2" where Text1 is "total sum" in first subform and Text2 is "total sum" in second subform...


I set default value = 0 for all fields in both subforms, but it won't help....still shows empty fields in that subform, which isn't filled....Actually when i open form for the first time, it shows "0" values in all empty fields and then immediately clears them and shows empty fields...

Any ideas how i could solve it?

Thanks

View 1 Replies View Related

How To Set Tab-order In Form With Subforms?

Sep 8, 2006

Hi!
I've developed a big main form with subforms on. All'n all there are lots of controls on all these forms. (4 subforms in the "main" form).

As I've added controls now and then, they are not added in order from top left to bottom right.

Anyone know if I can set taborder even for the subforms?

Cause now, the tab-order is bad.

Thanks for any help ;)

View 2 Replies View Related

Forms :: Getting A Form With 2 Subforms?

Apr 11, 2013

I need a form with 2 subforms. the main form is for an indidual. the first subform is a list of characteristics. the second subform is sort of a calendar function, produced for date scheduled, results, next meeting date.

I have tried the form wizard, but it produces a jumble of the mixed fields. Can I create a subform or 2 before I create the main form, and then link them somehow?

View 6 Replies View Related

Forms :: Form With Two Subforms

Oct 24, 2014

I want to create a form with two subforms. I create a form with one subform without problems but i would like to know how i can link the two subforms, so when i select a row in first subform display records in second subform.

View 1 Replies View Related







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