Refresh a form when closing another form

I apologize if this is posted somewhere already, I looked and didn't see 
anything that exactly matched.

I have created a form which serves as a record selection screen to allow a 
user to edit certain values.

Once the user highlights a particular row, they click on a "Edit Record" 
button.  This takes them to a second form which allows them to edit certain 
data fields. 

When the user has made the changes, they click on a "Save & Close" button 
which returns them to the record selection form.  

I wish to refresh the record selection form, when the "edit record" form 
closes.
0
Utf
3/21/2008 1:50:01 PM
access.forms 6864 articles. 2 followers. Follow

1 Replies
8887 Views

Similar Articles

[PageSpeed] 20

Try adding:

Private Sub Form_Close()
    Forms!MainForm.Requery
End Sub

in the Form Close Event of the edit record form.  Replace your actual form 
name for "MainForm".

-- 
--Roger Carlson
  MS Access MVP
  Access Database Samples: www.rogersaccesslibrary.com
  Want answers to your Access questions in your Email?
  Free subscription:
  http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

"dsc2bjn" <dsc2bjn@discussions.microsoft.com> wrote in message 
news:01F067B1-6461-4247-99C5-788DE1088191@microsoft.com...
>I apologize if this is posted somewhere already, I looked and didn't see
> anything that exactly matched.
>
> I have created a form which serves as a record selection screen to allow a
> user to edit certain values.
>
> Once the user highlights a particular row, they click on a "Edit Record"
> button.  This takes them to a second form which allows them to edit 
> certain
> data fields.
>
> When the user has made the changes, they click on a "Save & Close" button
> which returns them to the record selection form.
>
> I wish to refresh the record selection form, when the "edit record" form
> closes. 


1
Roger
3/21/2008 2:23:59 PM
Reply:

Similar Artilces:

yet another resource editting thread
I need to edit resources at runtime (i.e. the string table, menus, and dialog control sizes). I would like to use the BeginUpdateResource, UpdateResource, and EndUpdateResource functions. One of the problems I have is this: If I load the menu from file with FindResource, LoadResource, LockResource, I have the binary menu data, and I can't really manipulate raw binary. If I load the menu with LoadMenu, i have a CMenu, that I can change but I don't know how to convert the final menu back to binary data that I would update with the UpdateResource command. So, how do you update? Another...

send and close
Word 2003 Hi , When you send a Word doc as an e-mail, there is a button for "Send a Copy". How can I get Word to close automatically after I click that button. Do I have to do it via code or is there another button that I can put in the tool bar. Thanks, Joel ...

Autofill In Linked Forms
I have created a couple of forms by selecting all the fileds in the form wizard from two tables: 1. Suppliers (Fields: Supplier, Address, Contact, etc.) 2. Products (Fields: Supplier <Lookedup from Supplier Table>, Product, Rate, etc.) Upon clicking the toggle button on Suppliers form I have the Products form opened. However, as I enter the data in it, I want the Supplier filed in the same be automatically be filled with the Supplier name as in the opened Supplier form so as to be filtered and displayed the next time I open the same instead of manually inserting the sa...

Can see form in design view but not in open or layout view
I have set up the tables, relationships and forms. When I first created the form I was able to view when clicking open. I made a couple of changes and now when I click on open a box pops up to enter perimeter value. Also, I can no longer see the form in opne or layout but if I click for design view, I can see my form and all the tabs. There is either something missing or somthing is named incorrectly. Had a similar problem recently where a new version was installed in the front end, but the table in the back end had not been updated properly (a new field) and the new version of the...

Name Range with using Data Form
I first created a variable with A1:D1, four columns with named variable Data. How to expand this Data range to A1:D2 after using the DataForm to add one row data in the worksheet?? The same, the Data range should be A1:D3 when adding one more data row... million thanks Hi use the following formula in the name definition dialog =OFFSET($A$1:$D$1,0,0,COUNTA($A:$A)) >-----Original Message----- >I first created a variable with A1:D1, four columns with named variable >Data. How to expand this Data range to A1:D2 after using the DataForm to add >one row data in the worksheet?? The...

Strange Problem when closing the database object
Hi All, I have a COM component using which is interacting with the database using the CDAODATABASE class. my applications works fine when i built it with VS6. when i built the application with VS2005, the application is suddently unloaded when i am trying to close the database. my database object is CDaoDatabase *m_DB; when my application calls the following method the component is getting unloaded. STDMETHODIMP CFeatureTable::Close() { AFX_MANAGE_STATE(AfxGetStaticModuleState()) HRESULT hRes = S_OK; if (!m_Initialized) return S_OK; TRY_DAO { // Nee...

Subtracting value from main form
I have a borrow module which will alow user to return item separately. So, I have get the structure of returning it separately. In my main form is the borrowing item, with the loaned quantity and the owed quantity (will be calculated). In the subform, there is the returning transaction. User will need to key in the quantity returned and it will be automatically deducted from the quantity owed. But how am I supposed to get the quantity deducted while it 1 is in main form and the other is in subform? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-fo...

Outlook/Access 2003
I've been doing a lot of research and purchased (but haven't completely read) Sue Mosher's book. However, before I spend much more time I'd like to find out if my idea is even feasible. The basic idea is to create an appointment system for multiple therapists that can be used by a receptionist and other staff. Using Outlook and Exchange is very nice but the appointment data needs to end up in an Access table immediately. We can purchase SBS 2003 with Exchange 2003 or we can buy a third party tool for calendar sharing whichever would be the easiest to use. I currently...

Keeping forms in order they are entered?
I am working with a database that was designed for us and have pretty much just used without having to change much in but have now run into a problem and hope someone can help. We track and number complaints we recieve by number using last digits of year recieved then next number, i.e. a complaint recived 12/31/09 might be 9234 and first one received this year would be 10001 and the next would be 10002. The problem is now when I open my forms and go to the last one it is the 9234 instead of the 10002 which I need. How do I keep that last form I entered last the next time I open the data...

switch users without closing program
Hi, Is there a way to switch profiles without closing Outlook 2002? Thanks, Duane ...

increment through controls on form
I have a form that I've name the controls on it in such a way that I could determine through open args if it should be locked or not. Example any text box that begins with txtd would be unlocked with open args of 1. I was hoping there was a way I could just move through the controls in a loop and set that property with one function.....I'm not for sure how to accomplish this though. Does anyone have some sample code on how to "loop" through all the controls on a form and set the locked property? I can write the criteria portion if I could get a sample of how to ...

I cannot paste from one workbook to another. Copy works, paste do.
When I attempt to copy from one workbook and paste into another, copy appears to work but paste does not. The paste menu item is grayed out in the workbook to which I attempt to paste. Are there setting that can be changed to aloow the paste?? Check to see if either workbook and/or worksheet is protected. If so, unprotect. Then Copy/Paste should work. BTW, how are you copy?paste(ing) Tab or content? Dennis "JimmyMc" wrote: > When I attempt to copy from one workbook and paste into another, copy appears > to work but paste does not. The paste menu item is grayed out...

Attach Trigger to Save Function of Form
I am in the processes of trying to attach a trigger to the Save function of an already existing GP form using Dex. In one of the documents, it states that the CM_Checkbook_Maitenance has a SaveRecord function. I am trying to acces the function that is similar to this on the PM_Vendor_Maitenance form. I tried using SaveRecord and when I tried to compile it it says that it is an unknown reference. Is there some documentation with a list of the functions for each form? Mike, PM_Vendor_Maintenance is an older form and probably doesn't have a SaveRecord function. Try running t...

look way to map form at CRM frontend to tables at CRM database
How can I find out what tables which new record has been added on when I enter data through a form in CRM front end? I try to find way to map form in the CRM frontend to the tables at the CRM database at backend? It is CRM 3.0 Thank in advances for help! ...

upload form problem / server question
www.icingpictures.co.uk / win xp / frontpage 2003 Want to create a form with upload file form field - i read on this forum that the server type i use is important - it should be a windows type server with frontpage extensions - i currently use a linux server with front page extensions - do i need to change to a windows server? Thanks for taking a looka t my question. Joyce Yes, you must have a Windows Server, just like you stated you read. -- Tom [Pepper] Willett Microsoft MVP - FrontPage Since 1997 --------------------------- "threademporium" <threademporiu...

Is batch ID is required in payables transaction entry form?
Is batch ID is required in payables transaction entry form? How about if I just have 1 invoice and do not want to create a batch for it? can I still process the invoice? Hi Bab, A batch i.d. number is not required. You have to post your invoice both in the Payables module and also in the Financial module. I check weekly for any "series batches" that have not been posted in my A/P, A/R, P/R, and Financial modules. If they go unposted it can create havoc. I hope this has been helpful to you. -- Diana "Bab" wrote: > Is batch ID is required in payables transa...

Help: Seting the value of another cell with a formula
I know that there's a way to make a cell a particular value based on the entries of a range, or array of cells, but is it possible to do the reverse, using only one formula in a cell. Here's what I'm trying to do: What I would like to do is set one of a range of cell to have a value based on the value in A2. Example: Cell A1 has a value of 2, A2 has a value of 2007. I want A10 to equal A1, i.e.:2 Cell A1 has a value of 2, A2 has a value of 2008. I want A11 to equal A1, i.e.:2 Cell A1 has a value of 2, A2 has a value of 2009. I want A12 to equal...

Fixing coloumn title in datasheet forms
I have a form which has a subform. Is there anyway to fix the length of the column heading in the datasheet view? I can expand it when viewing but when I close the form and open it again it has shrunk back to its smaller size. Thanks Tony Are you referring to the column width? If so check out columnwidth properties in help. Damon "Tony Williams" <tw@invalid.com> wrote in message news:%23RCxCN$4HHA.5844@TK2MSFTNGP02.phx.gbl... >I have a form which has a subform. Is there anyway to fix the length of the >column heading in the datasheet view? I can expand it when...

Dynamic Access Report from filtered Form
I need help. I have succuess fully applied the "how to create a dynamic crosstab report in access" from instructions off of microsofts web site to my own report and query. My problem is this. I have a form in datasheet view, based off a query. When the form is open I can hide / unhid columns as needed and apply filter by form. That all is great. But now I want to beable to send the filtered data on the datasheet form to the Dynamic Report I created showing only the filtered records and also only show the columns that I did not have hidden on my form. How do I do this? I have t...

INDIRECT on closed files
Hi there, I'm trying to reference a closed file using INDIRECT e.g. =INDIRECT('C:\[test.xls]Sheet1'!A1) But I just get a REF! error. Does anyone know if what I'm trying to do is possible, or am I just doing something wrong? Cheers, Graham ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ >>Does anyone know if what I'm trying to do is possible Sorry it's not possible. -- Jim Rech Excel MVP This file might be a help: http://www.b...

Print individual forms
I have created a form with several subforms in it. The form contains the same information for a number of different individuals. I would like to print the form for each individual separately. When i try to print it, if prints out the information for all the individuals. How do i do this. I have attached a screen shot of the first page of the form. The problem is that forms are used for user interface, and have things like buttons, radio controls etc. that often hinders the ability to print a form. furthermore you'll often find that the form has background sheeting, and I can waste...

Form Sizing 08-06-07
-- Thanks David G Albury, Australia DoCmd.Maximize ...

Passing Param to GP Forms with VB.net
Hello, I am writting a form that when you click on a grid, you open up another form with more detail (This form is a gp form.) and am trying to figure out how to pass the info that need the for to open up with. Matt -- Matthew Heinrich Casino Queen Inc. Development Team ...

problem in a form from crosstab query
Hi, I have a form from a crosstab query. On that form, I've added some fields to make "on the fly" calculations but they remain blank if one of the values returned from the query and used for calculation is = 0. What I can do? Thks in advance Use Nz() around each field, to replace null with zero. For example, instead of: =[A] + [B] + [C] use: =Nz([A],0) + Nz([B],0) + Nz([C],0) Here's another suggestion for getting a row total in a crosstab: http://allenbrowne.com/ser-67.html#RowTotal -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Acces...

design form?
What software should I use to design a form for listing my DVD collection? Are there templates available somewhere? To create a simple list Excel is well suited to this. If you want to create some sort of input form based list then Access would be your best bet. Outside of the MS Office range there are lots of other software available to do this, ranging from the simple to complex, cheap to expensive. Hope that helps, if you need more help post back _____________ Naz Lodon "boinks@acsalaska.net" wrote: > What software should I use to design a form for listing my DVD c...