So, my database appeared to be working OK yesterday however I occasionally saw an error in my "Update Event" script on one of my combo boxes.
today, now when I try the combo box, I get a immediate crash.If im assuming its the same combo box, here is the code for that box:
Code:
Private Sub MCAcmb_AfterUpdate()
Me.Model.RowSource = "SELECT DISTINCT [tbl].Record, [tbl].Model" & _
" FROM [tbl] WHERE Record = '" & Me.Recordcmb.Value & _
"' ORDER BY Model"
[code]...
I recently added a header...just tried it again and got the error:"The expression After Update you entered as the event property setting produced the following error:Object or class does not support the set of events."however I got it to work by entering VB, adding a space, removing it and then saving and entering the form view the form worked as normal. when i close and reload, i get the error again
It seems to be quite simple really. Make a form for Orders and add a subform for Order items. Write some VB code to chage values on the Order form when an Order item is added or amended. Add a "Find" dropdown to the Order form to find particular Order numbers.
Run the form and add/amend orders and items. This will work OK. Move to the next or subsequent order using the "Next" button. Add/Amend again - no problem. Drop down the "Find" control, select an order and the correct order comes up on the form. Amend an item. As the code attempts to change a text box on the Order form Access crashes.
The same code (to add up the items, take off discount and add on tax) can be run after a "Find" by changing a "Discount %" text box on the Order form and this works OK. Perhaps the Order form needs to be in focus for the code to work but I cannot see why this should be so.
In fact you don't actually need the "Find" dropdown. Any code that moves to another Order record programatically will cause Access to crash when an item is added/edited subsequently.
Making it crash is simple but stopping it has cost me a couple of days of frustation. Has anybody any ideas?
My Access 2000 project crashed and the computer dutifully asked to report the error to Microsoft, so I let it run. I then looked at the subsequent screen and was surprised. Well - silly me, maybe I shouldn't have been.:mad:
This screen simply said that Access 2000 was in "extended support" and my "solution" was to upgrade to a newer version. This was a bit irritating since the purpose of reporting feedback is to provide an opportunity to fix program bugs. So why ask the user to provide an error report if that report will simply be ignored and only used for a sales pitch.
While Microsoft has every right to discontinue product development, I would hope that they would still try to fix bugs that cause a program to crash. I guess Microsoft's quality control department has been outsourced to the same company that Dilbert works for. Additionally, I find euphemisms, such as "extended support" for "You are out of any help options, tough luck" to be quite irritating. Why not directly admit that we are on our own.
Also I am still on a slow boil over over the last six years by the fact that help for DAO/ADO disappeared from Access 2000 help which was in Acess97 help and Microsoft never got around to making it available as an update.
I have a DB which has been up and running with no problems for a couple of months.
A couple of users have recently had new machines installed. These are XP SP2 with Office 2000.
The Database FE is on the PC and the Backend is on the server.
When FE is first downloaded and opened it runs fine. The second time you go in the DB gets by the Splash screen but then crashes on the Title Menu. If you then recopy the FE to the machine it opens fine the first time then crashes again on the second attempt.
I have checked the references and all ok. I have full error trapping on the Splash screen and the Title Menu yet I just get the error "Access has encountered an error and needs to close..."
It runs fine on my machine which is XP SP2 with Office 2002. Has anyone any suggestions that I can check or repair this?
focking pissed off. i want to add an image to a some forms, the database is all working and that. but when i put a picture in in the design view and then go to view it the whole thing crashs. i nearly lost the whole data base from putting one on the home page, thank fock i had a back up and now ionly have to redo one form as the other one wont open anymore it will just crash every time i try to open it. i have no idea whats going on, i have other images that i put on it before, but i cant put any on now. anyone every encounted this and how do i over come it!
I have a database that runs a macro/report every 2 hours, however our network has been up and down lately. This causes the macro to fail when trying to log into the system because the table that is storing your username is no longer in the database. When I check, all tables, linked tables, forms, reports, macros and modules are all gone. I find the only way to get them back is to close the database and reopen.
What I want is a way to reconnect the objects without closing and reopening.
I've been experiencing a very frustrating problem recently.
One of my databases crahes randomly, and I'd like to know if some of you have tips to helps me.
The database is splited in front-end and back-end, both on the server. I know keeping the front-end on the client PC will improve performance, but due to a high number of users (about 60 to 80) and the need of doing frequent updates, installing the front-end on each machines is not an option for now.
Users are not all directly connected to the server. Those who are directly connecte4d to the server (in building A) have no problem. Those who don't (building B) have extensive lags on opening (about 30 seconds), and on about anything that calls an heavy query, most often leeding to a crash. Access display the message telling that the datbase needs to be repaired and restart.
I tryed several thing to improve my queries, like eleminating most of GROUP BY and UNIQUE clauses and avoiding the use of functions.
I have a lot of conditional formatting in the forms, but I don't think this is the problem, since it is executed on the local machine (as far as I know).
My theory is that the lags cause some call to the DB to timeout. I just dont know how to fix that. Is there an option to higher the timeout delay?
My other theory is that the problem is caused by dropped packets during the connection to the DB. I tryed downloading large files (100Mb to 250Mb) from the server several times and never had a problem. Although the connection is quite slow, the ping is very small, like below 10ms to 20ms. Is there better ways to test a network connection, if possible without installing software (limited rights on the machine)?
Would using Replicas be a solution? What are the pros and cons of it? I never used them and know very little about it. My idea would be of putting a back-end on both servers, but I guess the data would not be as live.
BTW, I am using Access 2002 (2000 file format) on an XP SP2 PC.
Thanks to all of you patient enough to read all of this! I Hope some of you have some awnsers, tips or tricks!
I've got a bit of a problem with linking a text box to a ComboBox. I have an employee name in a field [EmployeeName] that sits in the Header of a Form. (This is so I can show multiple records for that employee without having their name repeated at each one). I also have the name of contact [ContactName] that sits in the Detail area of the form.Both names come from their own tables that have all their contact numbers and e-mail addresses in columns I have linked the name to text boxes [ContactPhone] & [EmployeePhone] with their relevant phone numbers in within the Detail area of the form.
The ContactPhone that has the ContactName within the Details part of the form works well with no problems by putting =[ContactName].Column(1) in the Control Source
However when I put =[EmployeeName].Column(1) in the relevant Control Source (and / or EmployeeEMail in a second text box), once I have saved the form in Design view and returned to Form view, Access crashes and shuts down!If I remove the wording from the control source Access doesn't crash.
Yesterday my database crashed. It is the 'DEV' version for my application - so all of the current fixes/changes are in there and I have forgotten to backup!
It crashes when ever I try to enter the VBA editor, or build code. This occurred after a minor problem running some code (I forget which code).
The same occurs when I try to get into the code builder in the repaired version access generates...I have also tried using compact & repair to get in - but still no joy.
Can anyone offer any advice workaround to get this up and running again?
I am managing a traffic database and have currently constructed a series of queries that list average vehicle speed and total volume in five-minute intervals over the course of several months. From each of these queries, I need to create a subquery that, for each time interval, will simply average all speed values and sum all volumes into one record. Fields are: Time, Avg Of Speed, Sum Of Volume.
I created the subquery like so: SELECT DISTINCTROW [Speed Weekday (2 SB)].Time, Avg([Speed Weekday (2 SB)].Speed) AS [Avg Of Speed], Sum([Speed Weekday (2 SB)].Volume) AS [Sum Of Volume] FROM [Speed Weekday (2 SB)] GROUP BY [Speed Weekday (2 SB)].Time;
When I attempt to switch to datasheet view though, Access locks up every time and I am forced to end the program through the task manager. The query I'm referencing [Speed Weekday (2 SB)] has only 4800 records thus far, so it isn't a ridiculous amount of data. Any advice as to what is going wrong? Thanks in advance for any help!
have a form that uses comb boxes. Now the combo box is Label "Tank Size" and looks up it's values in a Table named "Tank Size" and stores the one you pick say 2500. Now the problem. In the "Tank Size" table the row also has the price in the next column. So when someone picks 2500 in the combo box it will also list the price in say a text box or something next to the combo box. I hope i explained it o.k.
My application crashes when trying to change the value of a text box in a continuous form. Here is the code:
Code: Private Sub cboPoCurrency_AfterUpdate() On Error GoTo ErrHandler Dim rst As Recordset
[Code].....
If I replace .txtUnitCost by MsgBox .txtUnitCost, it loops correctly through each record and returns the value. But if I try to change the value as shown in above code, MS Access crashes! (This is a desktop application with tables linked to SP lists - not a web app)
Hi guys, im working on a project whereby a Visual Basic module has been designed in MS Access to email out a RTF document attachment of reports to shift managers when they have hazard items not closed in their area. Im building an ASP front-end to the database and would like to incorporate a button to do the mailout, however i dont know how i can link it to fire the code when the button is pressed. Is it even possible?
I am trying to automate the process of sending a query result via email.
I have code that will export a query as an excel document, using DoCmd.SendObject, but it has the name of the query.
DoCmd.SendObject acSendQuery, "Dailyrpt", acFormatXLSX, email.address, , , "Daily Report", "This is today's report", -1, False (email.address would actually be the email address it is being sent to.)
I also have code that will export the query to excel and save it as a file, using DoCmd.OutputTo, where I was able to name it something meaningful to the end user, and include the date.
DoCmd.OutputTo acOutputQuery, "Dailyrpt", acFormatXLSX, "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx" Dim Foldername As String Foldername = "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx" Shell "C:Program Files (x86)Microsoft OfficeOffice14EXCEL.exe """ & Foldername & "", vbNormalFocus
Is there a way to either send the saved (renamed) file or to include the current date as part of the SendObject command?
I was quite familiar with DOS commands and was able to create access DBs and write the VBA button code. However that was quite a few years ago and Ive forgotten it all.For every image file in DIR A or subdirectory If that image file exists in DIR B, then delete the image in DIR B.
I have just installed the windows version of Access 2010 on OSX Mountain Lion using a program called Crossover which works very similarly to WINE. I have found that Access will install fine except for VBA form modules and BAS modules, although there seems to be no indication that they did not install as the entire install progresses fine.
I've put together an invoicing program that was created in Access 2010 in Windows but have transferred it over to Access 2010 installed on OSX. It contains a number of forms with code but when I go to VBE, form code modules are not visible. When I try to view the code for a form I get the following error message: "Microsoft Access failed to create the Visual Basic module. If your database is on a network drive, check your network connection, then try again". I was able to insert a BAS module and create a rudimentary VBA subroutine which ran without error so it does seem able to interpret VBA as per normal.
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.
I managed to create a form that is able to search keywords on Access 2007. However, the keyword search must be exact to what is contained in the table.
For example, I stored "red blue yellow" into the database, and I can only search "red blue yellow", "red blue" or "blue yellow" in order to call that data.
How do I make it such that I am able to search "blue red yellow", "yellow blue red" or "red yellow blue"?
These are my current codes:
Code: Private Sub txtSearch_AfterUpdate() Dim strWhere As String Dim strWord As String Dim varKeywords As Variant Dim i As Integer Dim IngLen As Long
Private Sub subCreateField(strTable As String, strField As String, strFieldType As String, strPath As String, lngVersion As Long)
Dim rstSerial As ADODB.Recordset Set rstSerial = New ADODB.Recordset rstSerial.Open "tblSerial", CurrentProject.connection, adOpenKeyset, adLockPessimistic rstSerial.MoveFirst If rstSerial!lngVersion < lngVersion Then
[code]....
Only the first field ("lngMethodID") gets created. The other two fields ("txtReferencePoint") and ("txtSpaceForPole") do not get created. If I exit the db before each sub call then all fields get added. Do I need to add some "refresh field" action or other action.
I am using access 2013 to make a PowerPoint presentation based on the data in a query. I know how to do that much using VBA but I am also trying to make a slide with a picture on it from a saved location.
Dim db As Database, rs As Recordset Dim ppObj As PowerPoint.Application Dim ppPres As PowerPoint.Presentation On Error GoTo err_cmdOLEPowerPoint
[code]....
At the moment I am not worrying about adding the data as I know how to do this and had it working before - its just adding the picture to the slide.
why this IF and Nz statement in my code below is not working. I know the me.txtrefNo value is "" (null) on a form field with property set to General Number. Therefore the Nz statement should return a "0" as I specified making the statement true as in 0 = 0 and then execute the actions below to generate a reference number however this it now happening as it's rendering the if statement as false and showing me the message " Whats going On?" which is after the else statement.
Code: If Nz(Me.txtrefNo, 0) = 0 Then Me.txtrefNo = DMax("[refNo]", "[R_P_Data_P]") + 1 tmpRefNo = Me.txtrefNo 'testing variable value MsgBox (tmpRefNo) Else MsgBox ("What's going on?") End If
PS. Does this have anything to do with the table field format that the me.txtrefNo value will be saved to?