I tried this but dont know how to stop the timer...I want to run the code that changes the Form color but want to be able to stop the Timer and reset it to start over..Will this timer work? Almost like an auction timer. But want to be able to reset the code at any stage...
Code:
Public Sub ExcelTimer()
Dim PauseTime, Start, Finish
I have globally defined 'Progress' as integerer and using the following code on my splash screen - i want to add a "." to the end of the label caption until progress = 10 (10 timer events)
Private Sub Form_Load() Progress = 0 End Sub
Code: Private Sub Form_Timer() Dim Dot As String Dot = "." Progress = Progress + 1 Me.lblProgress.Caption If Progress = 10 Then DoCmd.OpenForm "frmLogin" DoCmd.Close acForm, "frmSplash" End If End Sub
Code: Private Sub Form_Timer() Dim LocalTime, StartWindow, EndWindow As Date LocalTime = Format(TimeValue(Now()), "hh:mm") StartWindow = #11:46:00 AM# EndWindow = #11:48:00 AM# Dim Response
[Code] ....
The intent is to run automated back end maintenance activities while giving the user the option to delay it if they're in the middle of something.
My logic is as follows:
If it's between these two times, ask the user if the maintenance can run. If user says yes, run maintenance. If user says no shift the two times to the right and ask again in a few minutes.
As it is written, when I chose no I get an hourglass icon and if I try to do anything else Windows tells me Access isn't responding. I'm guessing that Access is hanging since I've initiated the Do Until and then stalled it by telling it to wait 3 minutes before it goes to the next step. I suspect that if I waited it out, when the new Startwindow hit I would be asked about running the maintenance again.
My issue is that I need the database to remain responsive to whatever the user needs to do while I wait to ask about running maintenance again. Therefore, I don't think Do Until is my answer - at least not the way I've implemented it.
The will ultimately be set on a 10 minute timer interval and start/end window will be 01:00 and 01:15 AM respectively. The times you see above are there for testing so I can see what happens.
This code puts pdf reports into a folder . I am prompted for a number via the query I run because I have more than one report the query asks me 3 times. Could this be modified so I only get prompted once for all the reports in the code
On Error GoTo Err_Handler Const FOLDER_EXISTS = 75 Const MESSAGE_TEXT1 = "No current invoice." Const MESSAGE_TEXT2 = "No folder set for storing PDF files." Dim strFullPath As String
I'm using an append query that needs to add the records from another database into a table. I can get it to get the data and add the records. There are other columns in the database that are not in the one the data is pulled from. If I would run the append query again, it would add the same records again at the end. How can I avoid this? I only need to add new records that are not yet in the database I want to pull the records to.
I was wondering if there's a way to set objects so that they don't get pushed down if an object above is set as Yes in the CanGrow property?can a report be split into columns?
I have been asked to replicate a form (previously written up on Word) which has two columns of information. As luck would have it all the fixed fields are on the Left hand side, so that part doesn't need (or want) to grow, However, the Right hand side has several sub-reports which can display 1-5 records each.
So if any of the sub reports show more than 1 record, they push down everything below it, but this includes the Left hand objects, creating gaps and often pushing the report onto 2 pages.
I need to stop already ran procedure or function with vba code . So I use END command ans everything stops.. in some cases that is useful, but some times need I to do something else after I use END command, but after END everything stops...
LIKE THIS :
SUB () END ME.CTL.SETFOCUS 'OR CALL function EXIT SUB
I have a Combo box which contains a set of numbers divided by "."
e.g.: 1.342567.24433
When looking for a certain code, I would like to use the number pad to enter the first few e.g. 1.34 to move to the Position. In Previous Versions of Access I had a function on the key
If KeyAscii = 44 Then DoCmd.CancelEvent 'stop the comma keypress being updated SendKeys ".", True 'put a full stop in the field End If
This worked fine, but in Access 7 and up, it turns off the number lock.
Is there an alternative to sendkeys to achieve the above or a way of directly turning the number lock on again?
i am running some code from vba to add a linked table and the do some lookups, then delete the linked tables.
When the linked table gets added, the navigation pane gets displayed. I have set it to do not display in the settings and it does not when it opens but when this code runs it opens and then stays open until the db is closed and reopened.
I am trying to use my db as a software and I really do not want this to show.
I have also noticed this in a database I have which has update queries and was fine in access 2000 but does what i described above when using in access 2010.
Any code that stops the vba from running if an 'output to' function is null. I've found some code using the DCount function but I'm struggling to adapt this to multiple excel outputs.
I'm sending 5 excel files via E mail to several addresses and I'm wanting to identify if the first file has records, currently using access 2010.
I have a sales sytem in Access 2010.New customers have to be imported to MYOB daily. I have a query that finds new customers and appends them to a table for importing at a later stage. I export the records in that table if the field "imported" is set to false. The results are exported to Excel so they can be imported into MYOB after some additional data is added. If there are no records to append to the import table I want to stop the export from happening. I am new to VBA and don't know how to express that the select query "000 Append New Customers...." should only run if the append query has records. If there are no records found, I want to put a message saying "no records found". Here is the code I have behind the command button:
Private Sub PrepCustcmd_Click() 'Turn warnings off DoCmd.SetWarnings False DoCmd.OpenQuery "000 Append New Customers to MYOB Customers", acViewNormal, acEdit
I am writing the following piece of code to be called again and again after 30 min. But I need to do invisible mouse move to stop screen saver occurring so i want to sendkeys after every 5 minutes. The Sub abc is in module and everything works except stopping screensaver from occurring.
Code: Private Sub UserForm_Initialize() 'Update the Barcodes printed today Call CommandButton1_Click 'Update batches to be scanned / batches scanned today Call CommandButton3_Click
I have a form that allows a user to complete a stock take. I would like to stop other users from receiving or despatching stock while a stock take is in progress.
Is there a way I can lock a table, or stop users adding or altering records that match certain criteria. i.e. don't let users receive or despatch stock from with a locationID of 'A'.
I can manually stop the AutoExec macro from running by holding down the shift button - how do you do it by VBA? I'm opening the db from Excel, and I don't want the Switchboard to display ...
Hello Administrator, contributors, experts and friends!
I am excited to join this blog for the very first time. I am new to MS Access but learning every day and doing very well. I am in process of buiding an Issues list and because of that you will see lot of me with tons of questions. First most, I will search this forum to find the answer otherwise I will be posting questions. Thanks for the opportunity to participate in this forum.
Hi im trying to see if there is a way to put a timer in tab pages. so that when the time expires it changes to another tab. I have it working fine with the command button. I have like 20 tabs all hidden until the user clicks the cmd. Now is there a way to put a timer? I know that i can do it with the Form_timer, but that dont seem to work with tabs. thanx
Hi guys, im looking to incorporate a timer function into my database.
Basically at the moment students can takes test in the 'quiz' form - id like a function that starts a timer once its opened, and then display the time taken in a message box when the test is finished.
Any ideas on how i should go about this would be much appreciated,
I wrote the following simple code in a form's event procedures, in order to create a splash screen for my application. The form remains open all the time, I meant it to close after cnt>10. I checked with message boxes and it seems that cnt never increases to more than 1. Any ideas why ?
Private Sub Form_Load() Dim cnt As Integer Me.TimerInterval = 1000 'timer interval 1 second cnt = 0 End Sub
Private Sub Form_Timer() Dim cnt As Integer cnt = cnt + 1 If cnt > 10 Then Me.TimerInterval = 0 DoCmd.Close acForm, Me.Name 'here I want the form to close End If End Sub
Where can one find what terms such as acForm, Me.Name, acPreview etc mean ?
Hi everyone, I quite new to access, so I would like to ask for a little help. Is it possible to create an alert in a database related to date and time. Shortly the user needs to be alerted when a certificate expires on a specific date. Is it possible to do that in Access? Thank you anticipated, Bye, Fehermaci
I created a form to list the number of customers in my lobby. In the Form Footer I placed a field to count the number of customers waiting (Name: CC1, Control Source: =Count([LName]). Works fine.
I want a Beep on the form if the customers exeed 5. I placed the following code in the Timer event but I cannot get the event to work. I believe it has something to do with the field name but I'm unsure. Any help would be appreciated.