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.
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.
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?
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.....
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?
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?
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
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.
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.
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.
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?
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:
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
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?
This has most definitely been asked before but I really cant find anything on the forum! Ive created a data entry form which has a save button which the user must click each time to save the record. However how do I refresh the form i.e. empty all data from the previous record without exiting the form. Ive tried to combine the undo macro but that simply deletes the previous record. Any help please!!!
I got a database that has lots of subform which are all locked, I got a button that open the same subform in a pop up form with a macro that insert a new record. But when I close the subform after puting the information in the new record does not update on the main form untill you go away from the current record and come back again
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.
I just added a ActiveX control to my program and I have a scroll mouse, and there when the user used the mouse to scroll through the records, the record changes but the ActiveX Control doesn't. My activeX Control is used for a digital signature. Anyone Have any ideas?
This is a lot more complicated than the title suggests. I was asked to reset the work order numbers used by the maintenance department. When they reach work order #9999 they want to start over. My best bet is to make a backup of the tables and create new ones that include the last 2-3 weeks of activity. If I do that I'll have two potential problems:
The next autonumber needs to be lower than the pre-existing records but not start at 1 Recombining data from the old table (for whatever reason) will create false relations
Does anyone know a possible solution to these problems or is there a better method to refresh the database?
I have a 'Snapshot' report, which gives up-to-the-minute data on a business - sales year-to-date, month-todate, week-to-date and today. They run this many times a day, but ideally, they would like to have the information display on a monitor, and be updated automatically every few minutes. Is there any way that a query can run by itself every few minutes, and gather the current information?
Quick question, in Access 2007, i created a table that pulls data out of our system via ODBC. No if the system gets updated, how do i refresh data in access? Please advise. Thanks in advance.
Hi all, I have a form (sub_Main) that opens and has an openargs value (Department) from my main form when user clicks on a cmd button. However, if I were to go back to my main form and click on another department the openargs value is not passed along. I have tried using Me.Refresh under LostFocus but it doesnt seem to work.
What is causing the openargs value from updating? Any help?
I have a field "NameView", irrelevant but it grabs a name from a seperate form from an ODBC connection. The purpose for the field is simply to grab the data from another form.
On the same form As NameView theres another field "Name" This Grabs the data from NameView and writes to the main table.
Everything works fine but "Name" will only update from "NameView" on a new record only and not on the current one. I have a VBA Statement on an afterupdate which Me.Name = Me.Nameview
I know this is probably something really simple - but I'm relatively new to VBA.
I'm trying to run an update query from a form, then refresh the form having all the input boxes and checkboxes etc set back to normal.
The problem being that I have a list box to select a record to update from.
Now, if I just refresh the form this list box updates properly - but none of the other controls (text boxes and check boxes) reset to their defaults.
If I try to reset them manually in the code then a) they don't reset and b) the list box no longer updates (depending on the location of the reset code).
Though the code I'm using to reset things works when the query is not executed.
The code I'm using is currently:
Private Sub Save_Record_Click() On Error GoTo Err_Save_Record_Click
Dim stDocName As String DoCmd.RunCommand acCmdSaveRecord stDocName = "Return to training" 'DoCmd.OpenQuery stDocName, acNormal, acEdit Me.Refresh Current.Value = False Exit_Save_Record_Click: Exit Sub
I have no VB skills at all have to do everything with macros etc. So please keep any replies simple. I have a database for students, courses and tutors - all worked fine until the customer wanted each student to do 2 courses at a time. The whole database is designed for statistical returns ie females with child care responsibilities living in a rural area etc., and the Course Id has to be the same on each course table. I split the course table into 2 tables with the same data, made a course entry form which appends new courses to both tables. My problem is that when I select a course ie no 234 for course 1 and 345 for course 2 I cannot get the subform to show the data unless I go to the next/previous record and back again; when I do this the main form opens at record 1. Is there a macro or piece of code I can use to automatically refresh OR a macro that will go to next record and then reopen the mainform at the place where I started?