Is it possible to delay the Form_Current event? I use the code below to duplicate records, ask for a change in teh reference number and then resort the database according to the reference numbers. This works fine until I introduce some code into a Form_Current procedure. Now whenever I activate the macro below to copy a record the data in the copy record is wiped out and the form rendered with its defaul values. I am assuming this is because the code in the Form_Current section is rendering the form whilst something else is trying to paste values in it so is ther a way to delay either the pasting of the new data or the activation of the Form_Current procedure?
I have tried using a few basic counters but to no avail! Any help would be greatly appreciatted.
This seems like a dumb question but for the life of me, I cannot figure out how to do it.
I want to display a message box when a form is opened and displayed based on some test done in the Form_Current Event. However all the code in the Form_Current event is fired off before the form is displayed. But I want the form to be displayed first.
The MsgBox is modal so the form isn't displayed until I click the OK Button on the msgbox.
How can I display the form first and then display the MsgBox?
I am a little confused as to when exactly the forms_current event is called. I have a form with a text box called Last_Name, bound to the "Last Name" field in the form's table. I have the following code in the FormsCurrent event: Dim test1, test2 As String test1 = Me.recordset.Fields.item("Last Name").Value test2 = Me.Last_Name.Value
Why is it that when I move from record to record in the form, when this event is called test2 contains the name in the current record, but test1 contains the name in the previous record?
I'd appreciate it if anyone could tell me how to edit the control tip delay in form design: ie: so as the controltip comes up much sooner than the default set by access? many thanks
I have a large Access application with several forms and modules. The form works fine and quickly. I have a combobox which queries the database containing 30,000 entries. This combobox is delayed in populating. So that if the user types into it the characters don't display for a couple of seconds. Is there anything to do to spped up the combobox? There is a join in the query so I removed it. It did not improve the delay. Any suggestions?
I have some code that is running in a FOR NEXT loop. I am calling another form each pass of the loop. For some reason the form does not fully come up, the box and header text come up but nothing inside the Form.... Any thoughts.....
At the end I want to display another Form that confirms the updates/calculations. But I want the Form to close after say 2-3 seconds. I tried a wait function but that does not allow the form to fully open as above....the wait function is waiting for the time i want but it again does not allow the form to open....it waits and then the form closes, never showing what is in the form?
Does anyone know how I could open a form display some information and then have it automatically close after a few seconds.
I call the Function TIMEDELAY below which is calling the Function Wait....Once in TIMEDELAY it opens the form and then supposed to wait then close....but the form never fully opens? .....
When moving to a new a record in my form, i will click on a text box and the following happens:The black line will flash much faster than normal (This will happen on any text box i click on) No text will appear while this is happening When it stops al the text that was typed in that period will appear After this 5 to 10 second text delay the text box and all other textboxes will work fine, until i move to a new record and the process starts again
Got something which has been bugging me like mad for weeks now;
We have a MS Access Database on a Citrix server and a local copy is downloaded to the clients directory when they log on.
When they actually double click and load the database(frontend) it loads for approx 4/5mins before it eventually opens. After that it is fine, unless they log off and back on again, then the same thing happens when they double click to open the database.
The Backend is stored on a seperate server with over 5million records on it.
Before we attempted Citrix we had a normal network and the frontend has always loaded fine on this.
I am building a faux Electronic Medical Records database for the purpose of training med students. I need a command button to pull up a report , but i want to delay the opening of the report (as if waiting for "tests" to come back or be uploaded) is there a way to do this with VBA? i read about the sleep api but i dont know how to get it to work or where to put the code
so what would i add and where would i add it to delay opening the report that is called EKG W/ Subreport ...
I have a command button (well, I have a few) that I would like to open a report, first opening a form that allows the user to enter a start and end date.
The code so far is:
On Error Resume Next If Err = 2501 Then Err.Clear DoCmd.OpenForm "DateSelect", acNormal DoCmd.OpenReport "All Events Report", acPreview
Now, when run, this code opens the form (DateSelect), but the report starts to run immediately - the On No Data event of the report kicks in (message box along the lines of "No data, closing report", so before the user has the opportunity to enter the dates, the report has decided that there is no data an closes.
Is there a way to pause the opening of the report until after the OK button is clicked on the pop up form?
Just for the sake of clarity, the pop-up form DateSelect is used to open various reports, so I can't add the open report command to the code for the OK button (that I know of?)
I have a continuous form with an SQL query as its record source, it is a dynaset. Each row on the form is for a specific picture, containing a unique ID, a pre-generated caption field, and an official caption field. The idea is that users will edit the pre-generated caption field, hit a button, then their changes to the pregenerate caption will be made to the value of the official caption field.
My VBA code for the button works fine, in that it doesn't return any errors. The problem is that there is some sort of delay between when the button is hit and when the official caption field is updated. After the first press, the form requeries and the official caption field is the same, but after a second press the official caption field will display the user's changes.
First, a recordset clone is created using an SQL query, the pre-generated caption column is selected and then the results are filtered to the single record that shares the picture ID of whatever row the user was working in. Next, an SQL update runs, replacing the value of the official caption field with the value of the pre-generated caption that is contained in the recordset clone. Then the form is requeried.
I've tried adding a change of focus at the beginning of the code and a 15 second pause between when the update statement runs and when the form is requeried, neither solves the issue. The problem can't entirely be my code, because a second press of the button will make the appropriate changes.
I know what you're thinking, why have divide the captions into pre-generated and official in the first place - why not use pre-generated caption as the caption source? There is a separate feature that allows a user to mass edit captions and I decided to retain the original pre-generated caption as a field, in the event that the user makes a mistake or decides to reference the content of the pre-generated caption.
I am using Access 2007 & trying to update a database to include a check & balance.
Currently a user enters their name into a form, selects a check box (Pass or Fail) & clicks a save button. Real simple form. The actual testing is performed on a standalone piece of equipment separate or outside of the MS Access database.
Here is the challenge, if someone does select Fail, I want to ensure this person comes back into a blank form (new entry) & confirms they have eventually passed. I want to give a time limit of 10 minutes before an email is sent out to their superiors. (I have the email portion figured out already).
Other entries will take place before the failed user comes back to the entry form so the form needs to be available for other people to enter their results.
I believe this can be done using some VBA and a query but I am not sure where to start especially with the 10 minute allowance to recheck the test status.
"how to COMPACT the DB by introducing delay of 10 seconds and then close the DB".In the Database, I'm able to accomplish the "Compact" the database using the function below.
Function Compact() SendKeys "%(FMC)", False End Function
As my DB is quite huge, the Compact action takes around 10 seconds to complete.Now, i would like to Close the Database after Compacting the DB. I tried including "DoCmd.Quit" in the function. The commands in the function, closes the DB but the Compact function doesn't seem to have executed as it needs 10 seconds to complete.
Function Compact() SendKeys "%(FMC)", False DoCmd.Quit End Function
how to introduce this delay of 10 seconds and then close the DB.