My repair form pulls data from the vendor table to display the vendor information.
Whenever i try to open the repair form, it gives me a popup first that says "enter the extention number"
regardless of entering data or pressing cancel my form gets displayed.
When i enter a number (a random number) it wil populate my extention field along with all other data. And when i dont enter any number and hit the cancel button, it populates all data except the extention field, that has nothing to do with the number that i enter but is the one stored in the vendor table.
I am confused what to do with this
Can anyone help me
I have a button that opens another form to enter data on. But when I click the button I am getting the error msg: "Can't find project or library." And the debugger goes to the following sub routine and highlights Date in 3rd line(tried to bold).
This only happens on 1 user's machine. The other 4 computers open it flawlessly. All 5 have the same setup/security. Don't know why it works on 4 and not the last one. Any ideas?
(Access97.) Private Sub Form_Open(Cancel As Integer) Dim x As Long Me.txtEntryDate.Value = Date Me.lblErrMsg.Caption = ""
Set rsVASRate = PTdb.OpenRecordset("SELECT * FROM tblVASRateCodes", dbOpenDynaset) x = 0 Do Until rsVASRate.EOF VASRate(x).RateCode = rsVASRate(0) VASRate(x).UnitFactor = rsVASRate("UnitValue") VASRate(x).CartonFactor = rsVASRate("CartonValue") x = x + 1 rsVASRate.MoveNext Loop
VASRateTableCount = x - 1
rsVASRate.Close
DoCmd.RunSQL ("DELETE * FROM tblVASData") 'clear VAS data summary table
If TableExists("tblVASEntry") Then DoCmd.RunSQL ("DELETE * FROM tblVASEntry") 'clear VAS data entry table Me.subform_VASEntry.Requery Else DoCmd.RunSQL ("CREATE TABLE tblVASEntry (VEID IDENTITY PRIMARY, 'Rate Code' INTEGER, Units INTEGER, Cartons INTEGER);") End If
I want to create a report using the data currently held in a form. I found this bit of code somewhere: DoCmd.OpenReport "report", acViewPreview, , "[job number] = " & txtFilter.Value
txtFilter is the name of textbox containing the data I want for the report. This works if in the table for txtFilter's data the field is set to a number. But if I set this field to text it comes up with a data type mismatch error. How do I solve this? (sorry new to access and vba). The reason I want to set it as a text field is so that I can limit the number of characters entered.
A receive a compile error when an OpenForm macro action is executed. The error message is: The form you referenced may be closed or may not exist in the database. Microsoft Access may have encountered a compile error in a Visual Basic module for the form.
when i want to open the database in an access database i have the following error. you have as the event property setting the expression entered when open.This expression has caused an error amppu (database name) can not find the form that is referred to
I have designed a DB in access 2010 and it opens fine on my computer. However, when others I work with (who still have 2003) try to open the database, they get the following error: "An Error Has Occured Trying to Load The Form "Form Name" - Do You Wish to Continue".
When I click Yes, it brings up all of the VBA code in the background, but when i close all of that out, it still doensn't open.I am by no means an access expert.
I have a Form opening from Access Options. I would like to close this Form using the Timer. The following is the code I have used but it is not working.
Private Sub Cover_Page_Form_Load() OpenTimer = Timer End Sub Private Sub Cover_Page_Form_Timer() If (Timer - OpenTime) = 5 Then DoCmd.Close acForm, "Cover_Page_Form", acSaveYes End Sub
Next question. If I can get this to work can I then use a DoCmd to open new Form within the code above or do I need a new process.
When i open my db in 2003 I get a compile error: “can’t find project or library i'm working in 07 please help!! Here is the function Code:Option Compare DatabaseOption ExplicitPublic Function HoursAndMinutes(interval As Variant) As String'************************************************* **********************' Function HoursAndMinutes(interval As Variant) As String' Returns time interval formatted as a hours:minutes string'************************************************* **********************Dim totalminutes As Long, totalseconds As LongDim hours As Long, minutes As Long, seconds As LongIf IsNull(interval) = True Then Exit Functionhours = Int(CSng(interval * 24))totalminutes = Int(CSng(interval * 1440)) ' 1440 = 24 hrs * 60 minsminutes = totalminutes Mod 60totalseconds = Int(CSng(interval * 86400)) ' 86400 = 1440 * 60 secsseconds = totalseconds Mod 60If seconds > 30 Then minutes = minutes + 1 ' round up the minutes andIf minutes > 59 Then hours = hours + 1: minutes = 0 ' adjust hoursHoursAndMinutes = hours & ":" & Format(minutes, "00")End FunctionPublic Function ElapsedTimeString(dateTimeStart As Date, dateTimeEnd As Date) As String'************************************************* ********************' Function ElapsedTimeString(dateTimeStart As Date, dateTimeEnd As Date) As String' Returns the time elapsed between a starting Date/Time and an ending' Date/Time formatted as a string that looks like this:' "10 days, 20 hours, 30 minutes, 40 seconds".'************************************************* ********************Dim interval As Double, str As String, days As VariantDim hours As String, minutes As String, seconds As StringIf IsNull(dateTimeStart) = True Or _ IsNull(dateTimeEnd) = True Then Exit Functioninterval = dateTimeEnd - dateTimeStartdays = Fix(CSng(interval))hours = Format(interval, "h")minutes = Format(interval, "n")seconds = Format(interval, "s")' Days part of the stringstr = IIf(days = 0, "", _ IIf(days = 1, days & " Day", days & " Days"))str = str & IIf(days = 0, "", _ IIf(hours & minutes & seconds <> "000", ", ", " "))' Hours part of the stringstr = str & IIf(hours = "0", "", _ IIf(hours = "1", hours & " Hour", hours & " Hours"))str = str & IIf(hours = "0", "", _ IIf(minutes & seconds <> "00", ", ", " "))' Minutes part of the stringstr = str & IIf(minutes = "0", "", _ IIf(minutes = "1", minutes & " Minute", minutes & " Minutes"))str = str & IIf(minutes = "0", "", IIf(seconds <> "0", ", ", " "))' Seconds part of the stringstr = str & IIf(seconds = "0", "", _ IIf(seconds = "1", seconds & " Second", seconds & " Seconds"))ElapsedTimeString = IIf(str = "", "0", str)End FunctionPublic Function ElapsedDays(dateTimeStart As Date, dateTimeEnd As Date) As String'************************************************* ********************' Function ElapsedDays(dateTimeStart As Date, dateTimeEnd As Date) As String' Returns the time elapsed in days between a starting Date/Time and' an ending Date/Time formatted as a string that looks like this:' "10 days" or "1 day".'************************************************* ********************Dim interval As Double, days As VariantIf IsNull(dateTimeStart) = True Or _ IsNull(dateTimeEnd) = True Then Exit Functioninterval = dateTimeEnd - dateTimeStartdays = Fix(CSng(interval))ElapsedDays = IIf(days = 1, days & " Day", days & " Days")End Function
When I'm trying to open a back end database which was previously created is MS Access 97 it gives me the following error;
Cannot update. Database or object is read-only.
I have tried running the "Compact/Repair Function of MS Access 97 and MS Access 2003 to no avail.
I have tried converting the back-end to Access 2003 as well but I still get the same error message. I can link to the database tables from an Access 2003 database fine with no error message!!
Has anyone got any suggestions before I have to take it offline and rebuild the back-end and then copy the data across from the old one?!!!
I have a subform which opens good with Access 2003 but now that I updated to Access 2007, it won't open. It gives me a "type mismatch in expression" error. Why does this happen??
I have created a database then saved it to my computer. Now while I am trying to open MS ACCESS in my computer I am getting an error message -
"This file may not be safe if it contains that was intended to harm your computer. Do you want to open this file or cancel the operation?" Giving the options - 'CANCEL' 'OPEN' 'MORE INFO'
I just recently helped a local business move their files to a new server, and reinstall fresh windows and office on all their machines. I have run into a problem with Access, hoping someone can help.
Sometimes (usually when someone else has the file open), if you double click on the mdb file (which is on a mapped drive) nothing happens. If you make a shortcut that doesnt help. But if you open Access, and then goto File-Open and located the MDB file that way, it opens fine.
This is annoying to the employees and they want a solution.
In the database that I use at work sometimes when we OPEN it we get an immediate error saying out of memory, therefore we close it and reopen and all is good.
This is a problem when the average user logs on as they don't close it, they just continue on and then start experiencing issues.
I thought that the memory was supposed to clear when you close the database.
We run the debugger and no errors are ever found, we also run the compact and repair.
This can happen 1 in 10 or maybe 20 times when we open the database.
The code behind the report - sets on open_report event is the following however i cant see any issues with it as i use it elsewhere..
Code: ' Create underlying recordset for report using criteria entered in Dim intX As Integer Dim qdf As QueryDef Dim frm As Form ' Set database variable to current database. Set dbsReport = CurrentDb
[code]....
I will also attach a copy of how i set the criteria in the query and the parameters
When I open a query whether by double click or command button, the following error appears
What does it mean ?? this error appears sometimes not always. I can't figure out what this error refers to, as long as there no any error description or code.
Using an Access 2003 format database, opening in Access 2007...When I try to open my database I get two errors and it will not open.ID is not an index in this table.ParentId is not an index in this table.
I get the error when it opens with autoexec and when I bypass autoexec. I have a master copy of the database that I tried to link to the first database to import tables but I still get the error.
I have made a database, splitted it and then made the front end as accde. After that I copied both Front end & back end files in a shared folder. It is working fine as long as I am using it from my computer, but when I go to the other computer and try to open the front end, it gives the message of Unrecognized format error. This problem is only with the accde file, all other files are opening except this.
When I launch my Database file, it would normally run some scripts (I don't actually know what they do, the file is not used by me, only colleagues).
Instead i get this error:
The expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events.
When I click 'OK' another error appears:
The expression On Timer you entered as the even property setting produced the following error: Object or class does not support the set of events.
Once i click 'OK' on this error, another error sometimes occurs:
The expression MouseMove you entered as the even property setting produced the following error: Object or class does not support the set of events.
But strangely enough the third error doesn't occur every time i move the mouse.
After these errors have been closed, all i have is my 'form' with a loading bar. I cant access the actual database. Nor can i get into the Visual Basic to try and find the cause. This is happening to multiple clients of mine, and me personally.
Running Windows 7, Server 2008 (64bit), Windows 7 (64bit) Running Access 2007 and Access 2010.
I have tried changing permissions on the file, this doesn't work.
Here's my Goal: To open a saved query that has a parameter, setting that parameter via a VBA sub.
Here's my Problem: I was getting various errors, but after debugging my program a bit, it comes down to a "Data Type Conversion Error"
Here's my Code:
Set db = CurrentDb Set qd = db.QueryDefs("qryMY_DATA") qd.Parameters(0) = Me.txt_ReferenceID Set rs = qd.OpenRecordset("qryMY_DATA", dbDynaset)
Code: '*** Database Variables Dim db As DAO.Database, rs As DAO.Recordset, gq As DAO.QueryDef, prm As DAO.Recordset
I've been all over the forums and tried several different approaches, all to no avail. The Query runs fine in the QDT, but kicks back an error when I try to run it from my sub.
I have a form that contains a subform. The subform is a datasheet which calls the results of a query of 4 tables (tbl_companies, tbl_deals, tbl_products, tbl_vl).
In the main form there is a button which opens a report with a historical record of dates of value changes of each product up to a chosen date. This chosen date is determined by inputting a date into a text box.
This report also sources (tbl_companies, tbl_deals, tbl_products, tbl_vl).
When I try to open the report, I get the run-time error "3211".
'The database engine could not lock the table "Tbl_companies" because its already in use by another person or process.'
I'm guessing that because the query for the subform is already calling the table, the query for the report can't call the table at the same time?
I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.
The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.
The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.
I am using Access 2010 - Version 14.0.61.29.5000 (32-bit)
I am building a custom Export Wizard to export data to Excel using the Report Wizard for the basic ideas.
All I am trying to do is have a [Back] button on a form to open another form and close the current form.
Private Sub cmdBack_Click() DoCmd.OpenForm "frm_ExportWizardPage2", , , , , , Nz(Me.OpenArgs) DoCmd.Close acForm, "frm_ExportWizardPage3" End Sub
The new form is opening but then the current form is not closing. All forms are the same size, shape and positioned centrally although this should not make any difference.
Could this be anything to do with which form has the focus when I open the new form?
I have a form, which is comprised of a sub form, and some of the text box controls sided with a button, and the event had been written to the button.
Now, to give a note on how had the sub form had been created is firstly taking a clone of the "Payments" table and using it as a datasheet, and then create a sub form in the form, it works fine
I have a form based on a table called tblListMaster and I want to allow users to open up another form showing all the members of one of the entries in that table so I have added a button called 'Show List Members'.
The list members form which I then want to bring up is also based on tblListMembers (it's a master-detail form). When I hit the button to open up the list members form I get an error message saying that the table is already opened exclusively.
I can understand why I get that message so I thought I would be cunning and create a dummy form which I open up, passing in my list id in the openargs (at that point I also close the original form) and then from that dummy form automatically open up the master detail form and close the dummy.
Code in List Master form
Private Sub cmdListMembers_Click() ' open up the list members form
I'm creating a database to track new policies request. I have a form in datasheet view that displays a list for all Initial Review and Draft status. I would like to click (... or maybe double click) on the Policy Name field that will display all fields into single form that is link to PolicyID ... to update any info needed. In other words i want to click on that record to be display in actual form.
Private Sub PolicyName_Click() Dim stDoc As String Dim stWhere As String Dim strsql As String Dim DB As DAO.Database