Pausing / Time Delay

Sep 30, 2005

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? .....

View Replies


ADVERTISEMENT

Pausing For Batch Runtime

Aug 7, 2006

I'm trying to import a file that's being updated with information from an RS232 data logger. While there is no information updating the file, it's safe to import the file and then empty it which can be done from DOS copy commands, essentially I do the following:

Make a snapshot of the existing data into an upload.txt file, import it into Access, overwrite the logging.txt file with a blank copy, overwrite the snapshot with a blank copy.

The reason I'm doing this in DOS is that the import routine fails within Access saying that the logging.txt file is already in use and can't be accessed (I'm assuming that Access wants to take full control of the file, or opens it in a particular way hence the batch file approach)

The problem I'm experiencing is that Macros allow you to run batch files, but the macro continues to run immediately after the batch file is triggered to run, so in this particular case, the information in the logging.txt file isn't copied quick enough to the upload.txt file before Access tries to import it, meaning that Access imports no information (empty file) and then the macro of course runs the second batch file which then empties both the logging.txt file and the upload.txt file.

Two options at the moment if suggestions are willing and available:

1) Somehow stop Access trying to take full control of the text file and allow it to import the information and then overwrite the file with a blank copy.

2) Make Access wait until the batch file has finished before proceeding with the macro.

A couple of thoughts cross my mind for option 2, a timed loop to wait for the batch file, although no guarantees on timing on that one and also perhaps having the batch file create a tag.txt file after the copy is complete which Access looks for before continuing the Macro (maybe have to go into VBA coding for that) then delete the tag file after import routine has finished (the tag file of course will not be in use, so deletion from within Access would be possible)

It's always better to bounce these ideas round the board before heading down one particular road.

Thanks everyone.

View 3 Replies View Related

Control Tip Delay

Apr 6, 2005

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

View 2 Replies View Related

Combobox Delay

May 22, 2005

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?

Thanks

View 1 Replies View Related

Delay Form_Current() ?

Jun 8, 2005

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.

Cheers

_______________________________

Private Sub cmdCopyPrevRec_Click()

On Error GoTo Err_cmdCopyPrevRec_Click

Dim TestNum As String

TestNum = Test_Number

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70

NewTestNum = InputBox("Please enter test number:", "Test Number", TestNum + ".1")

Test_Number = NewTestNum

Test_Number.SetFocus

DoCmd.RunCommand acCmdSortAscending

DoCmd.FindRecord NewTestNum, , , , , acCurrent, True

Exit_cmdCopyPrevRec_Click:
Exit Sub

Err_cmdCopyPrevRec_Click:
Display = MsgBox("Copied without updating Test Number", vbOKOnly)
Resume Exit_cmdCopyPrevRec_Click

End Sub

View 1 Replies View Related

How To Delay The Processing For Seconds

Aug 1, 2007

Is there any function to delay the system processing for a number of seconds.

For the time being I am do it indirectly by using loops, however, it is un proper way, as it is not scalable.

Also I dont want to use the timer control.

Thanks,

View 4 Replies View Related

Forms :: Typing Delay In Textboxes

Dec 16, 2013

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

View 2 Replies View Related

Citrix, Opening A Database, Incurs Delay?

Jun 13, 2006

Hi Guys,

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.

Any ideas?

Thanks.

View 1 Replies View Related

Modules & VBA :: DELAY FUNCTION - Opening Report

Sep 4, 2013

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 ...

View 3 Replies View Related

Modules & VBA :: 2 Minutes Delay When Code Is Within The Loop

May 15, 2015

I want to make delay, for example 2 minutes when the code is within the loop.

Example

Code:
For i = 0 To 100
Debug.Print i
'Before go to the next to make the delay
Next

View 12 Replies View Related

Modules & VBA :: Delay Report Opening Until Parameters Are Chosen

Dec 22, 2014

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?)

View 8 Replies View Related

General :: Delay When Field Is Updated And Form Is Re-queried

Jun 15, 2015

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.

View 1 Replies View Related

Modules & VBA :: How To Delay A Query But Continue To Enter Data

Jul 23, 2015

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.

View 8 Replies View Related

Modules & VBA :: Compact And Close Database With Delay - Access 2007

Feb 12, 2014

"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.

View 3 Replies View Related

Time Format - Short Time Displayed As Medium Time

May 23, 2006

I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.

The link works fine but the time formats are different.

On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format

However on PC 2, opening the same database via the network, the time format is still shorttime but when you read the time within the code it comes out in AM/PM format. Also, when the defaul tiem should be #20:00:00# but this changes to #8:00:00 PM#

Weirdly though, when you just open the table, the times are in the correct shorttime format.

Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?

Any ideas?

This screen shot may help:

View 2 Replies View Related

Time Format - Short Time Displayed As Medium Time

May 23, 2006

I have an application with a backend db on PC 1, and the same application on PC 2 linked to the backend db on PC 1 via the network.

The link works fine but the time formats are different.

On PC 1 the time format is shortime and displays as it should i.e. in 24 hour clock format

However on PC 2, opening the same database via the network, the time format is still short time but the format is in AM/PM or medium time.

Guessing, it must be a setting within the main core of Access 2003 that is different between the 2 instances?

Any ideas?

View 1 Replies View Related

Reports :: Auto Populate Date And Time Every Time Form Is Updated

Nov 8, 2013

I have a database that stores information for lab testing. Each time a tech does a "step" in the test process he logs it in the table, using an input form. There are different categories, for example preparation, testing, analysis, etc, and each of those steps take time. I have the form autopopulate the date and time with NOW() evertime the form is updated. What i want to do is calculate the time it takes to do each in days. I can easily get how many days it was from now since they logged the test, =NOW()-TestDateTime. What I want to do is get the number of days it took to do each step, ie the number of days between each event. Is there a way to do this?

View 3 Replies View Related

Forms :: Add Time Value To Time Data Type SQL Server Field In Access

May 6, 2015

how to be able to enter time in access form the same way as if would be an access table (1p = 1:00 PM; 1.25 = 1:25 AM etc)

View 1 Replies View Related

Reports :: Attendance Database - Show Time In And Time Out For Specific Date

Apr 3, 2014

I have an attendance database and I connect the time attendance machine db to my access db, what i am trying to do is to generate a report that shows the time in and time out for specific date. the type of attendance db is date/time.

Please see the attached screenshot db from attendance machine.

an also some time there is duplicate entry, I need to get the first and the last entry only for specific date.

View 4 Replies View Related

General :: Formatting Time Conversion - Calculated Elapsed Time

Dec 3, 2013

Formatting issue regarding elapsed time calculated using DateDiff().

I understand that you can specify the output value for DateDiff(). In my case I have chosen "n" for minutes. Each result in my query shows the correct calculation in terms of minutes.

[PunchIn] = 11/23/2013 8:11:28 AM
[PunchOut] = 11/23/2013 5:43:30 PM

[ShiftLength] =DateDiff("n", [PunchIn],[PunchOut]) = 572 minutes.

Now when I try to format the result in terms of H:MM (be it in a form or a report) I get varied results. I'll illustrate an example below:

=Format(([ShiftLength]/60),"0") & "." & Format(([ShiftLength] Mod 60),"00") Returns 10.32 Not correct

=Format(([ShiftLength]60),"0") & "." & Format(([ShiftLength] Mod 60),"00") Returns 9.32 This is correct but I need my result to be in the form of a decimal such as my next example

=([ShiftLength]/60) Returns 9.53333333. Getting there but how do I have this result only show two decimal points 9.53?

View 6 Replies View Related

Forms :: Update Time Portion Of Date / Time Field

Aug 29, 2013

I have a date/time text field on a form with the General Date format and a combo box next to it that has sequencial times as the row source (IE. 12:45 AM, 1:00 AM, 1:15 AM, 1:30 AM, ETC.) When the user chooses a time in the combo box, I want the time portion of the text box to be updated with the chosen time in the combo. I have tried a few things but cant seem to get it right.

View 4 Replies View Related

Prevent Double Booking Using One Date And Start Time With End Time

Apr 10, 2015

so i created a system to have events booked, and i am trying to check time availability of the event room available, but i dont know what wrong. it either my query or vba code. i have attached the attachment,

View 5 Replies View Related

Modules & VBA :: Calculating Elapsed Time Within Time Period

Dec 1, 2013

I have a working dB which can calculate a shift duration and sum total all shifts worked within a period for the purpose of producing a labor report for payroll. I have successfully used the DateDiff function and converted the minutes to HH:MM on my form and reports. Now I want to calculate elapsed time for a specific period within a shift, I'll call it OtherHours and I am aiming to calculate a portion of time that meet the following conditions below. I am using field names of [PunchIn] and [PunchOut] and both are of type General Date.

IF [PunchOut] ISNOT Saturday,Sunday
EXIT FUNCTION
ELSE
IF [PunchOut] ISNOT Between Midnight and 0559 hours
EXIT FUNCTION
ELSE
DATEDIFF ("n", <MIDNIGHT>, [PunchOut])

My thoughts are to solve the DateDiff portion and then figure out how to apply the conditions within the IF statements.

View 4 Replies View Related

Calculating Total Time But Excluding Overlapping Time

Aug 22, 2012

I have a database consisting of two tables. One is "articles" and the other is "tasks". To put it simply, I would like to find how much time the article spends in tasks, but one article can have many tasks, and they often (but not always) overlap. Tasks have a start and end date field.

View 8 Replies View Related

Ignore Time In Date And Time Field

Mar 6, 2007

Hi,

Wonder if someone can help please. I'm quite new to Access so please bear with me.

I have a data field in my database consisting of both a date and time.

I then have a form containing two fields where the user can type a 'To' and 'From' date to extract the records that they are interested in. The query behind this uses the 'Between[Enter The Date] And [Enter The Date]' coding.

The problem is that because the field contains a time it doesn't return any records when I run the query.

Can anyone offer a bit of guidance on how I could ignore the time part of the field perhaps by adapting the above.

Many thanks

Chris

View 2 Replies View Related

Time Management - Simple Time Clock

Jan 9, 2006

Hi all, I havent' been around in a while (toddler, work, getting my BS degree and new baby coming in a week and a half) so I am hopefully not asking a previously posted question.

I'm suspecting my new work isn't accurately paying for the hours worked. I made a quick simple DB where I input my punch times in short time format. There's the typical In, Out for Lunch, In from Lunch, and Out. I've got it correctly adding the times so that it reports the total hours worked per day, though, in order for it to display correctly, that total is in short time as well.

The problem is, when I group a week together, as soon as the sum of the totals reaches 24 or more, it goes back to 0, as it's on the idea that there's only 24 hours in a day.

Hopefully, it's just a formatting issue or is there a function to convert the times (or just the sum) to number of hours?

Thanks and Happy New Year to all.

-Jim

View 2 Replies View Related







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