Forms :: Making Directory - Runtime Error 13

May 25, 2014

I'm getting a runtime error 13 on this line of code. Its a piece of code to make a directory, but I cant see anything wrong!

Code:
strBackUpDogNameFolder = "c:GPandDetectionDogTrainingLogBackUpsandReports" & Forms![frm_Profile]![Discipline] " & Forms![frm_Profile]![DogName]"

View Replies


ADVERTISEMENT

Forms :: Runtime Error On Changing Selection

Jul 14, 2015

I have a Main form (MainForm) with two subforms (SFormA, SFormB). These SForms are connected to the MainForm by a control (controlA) and connected to each other by a control (controlB) via an unbound control in the main form, in order to change data in SFormB according to selected record in SFormA. SFormB has an on current event procedure determined to show different things depending on the value of a bound control that changes every time I select a different record in SFormA. Everything works fine when Mainform and SForms first load.

But, when I select a record on SFormA I get a runtime error and everything stops, application closes and reopens, creating a safety copy. It seems to me that the on current procedure on SFormB causes this problem, because if I delete it no error appears (SFormB not showing what I want though). Funny thing is I have another database, same design, same structure, same procedures, (different objects and names of course) and it works perfectly alright. I even recreated the whole database still the same error.

View 14 Replies View Related

Forms :: Runtime Error 2110 But Only On Last Control

Mar 24, 2015

While I have developed many databases using other RDBMSs I'm afraid I'm something of an Access 2007 newbie so the vast bulk of my experience counts for nought given Access' many "unique features".

What I have is a form with about 3 text fields, 2 date fields and a number of comboboxes on it. Although, for now I'm not worrying about the combo boxes until I get the other fields working.

I am trying to develop an update screen where the user types the primary key value for a record into the first field and using DLookup retrieve the other values from the table and insert them into the form so the user can adjust them if they wish and click the Save button to write the changes back to the table. That's the theory.

Unfortunately the reality is, although the values added to the other fields using DLookup are "there" they don't appear on the screen until the controls lose focus. My best guess is because they are being added programatically and no Return key is being pressed, focus will not change and they will never appear.

So to get around this I put a line of code in the GotFocus event of each control to move focus on to the next control, effectively "looping" the focus once around the controls. This worked well until the focus was being moved from the second last control to the last control when I got, Runtime error 2110: Can't move focus to this control. The control was visible and enabled, as was a dummy control I tacked on the end to see what happened.

Main code block in Exit event of first field:

Private Sub Text6_Exit(Cancel As Integer)
Dim varItemType, varItemTypeCode, varItemClass, varItemClassCode, varDescription As Variant
Dim varPurchaseDate, varWarrantyEnd As Variant
Dim varItemTypeTxt As AcTextFormat
Dim PurchaseDateSQL As String

[code]....

View 5 Replies View Related

Forms :: Button To Go To Desktop From Form - Runtime Error 490

Mar 7, 2015

I was trying from a button on my form that will go to and bring up the desktop. I want it so I can put this database on anyone's computer and the button will work.

I am using this and it works but only on my computer.

Application.FollowHyperlink "C:UsersBryanDesktop"

I also tried this

Application.FollowHyperlink "C:Show Desktop.scf"
And
Application.FollowHyperlink "C:WINDOWSSystemShow Desktop.scf"

Both gives Runtime error 490 cannot open specified file.

View 14 Replies View Related

Forms :: Combobox With Dates - Runtime Error 3464

Mar 15, 2015

Run into a bit of an issue with a combo box that has dates. When I click on a date I receive:

Run-time error '3464': 'Data type mismatch in criteria expression'

Am I receiving this because I have declared it a string when I should declare it something else?

My other question for whenever I get the first part fixed. Is there a way that instead of having all the possible dates to select from, that I could simply have three options available: Within a year, More than a year, and no date. (Once I click on one of those three options, I will filter records that have a date within the past year, over a year, or no date at all. How would I be able to achieve this?

View 2 Replies View Related

Forms :: Runtime Error When Adding A New Record From A Subform?

May 12, 2014

I have a main form with several subforms in tabs. From one of the subforms I list linked records to the main form (Clients) within that subform (Bank account details). I list the records and have a button to add new records.

Where the Client has one or more records in the subform the add button works perfectly.

When the subform has no records the add new records button produces the following error "Run-time error '2498' An expression you entered is the wrong data type for one of the arguments"

The add button has

Private Sub Command52_Click()
DoCmd.OpenForm "AddClientBankDetailsFrm", acNormal, , , , acFormAdd, OpenArgs:=Me!ClientId
End Sub

the "AddClientBankDetailsFrm" popup form has

Private Sub Form_Load()
If IsNull(Me.OpenArgs) = False Then
MsgBox "Form was opened with ClientID = " & Me.OpenArgs
Me!ClientId = Me.OpenArgs
Else
MsgBox "No ClientID was passed."
End If
End Sub

ClientId is the primary key of the main form and the secondary key in the new record.

View 14 Replies View Related

Forms :: Runtime Error 2110 In Search Field

Dec 19, 2013

I am getting a runtime error '2110' - access can't move the focus to the control SearchResults.

This ONLY happens when the first character I type in the SearchFor field is the letter "I". All other characters do NOT give the error.

Why it only backfires on character "I"?

The Form has Search field [SearchFor] and a List box [Searchresults].

A requery occurs after every new character in [SearchFor].

View 7 Replies View Related

Forms :: Runtime Error 3078 - Cannot Find Input Table

Apr 8, 2013

I have a form that has a button that calls the following code:

Sub ClosePO_Click()
Dim db As DAO.Database
Dim mvalue As String, strSql as string
Set db = CurrentDb
mvalue = Me.Combo73 'combo box on OpenPO Form
strSql = "UPDATE Print SET OpenPO = NO where [GPO Invoice Number] = '" & mvalue & "'"
Debug.Print strSql
db.Execute dbFailOnError
db.Close
Set db = Nothing
End Sub

When I run (or step through the code, I get the Run-Time Error 3078 ... database cannot find the input table.However, when I copy the debug.print output in the immmediate window and paste into the query builder, the query runs. Here is an example of the debug.print output:

UPDATE [Print] set OpenPO = NO where [GPO Invoice Number] = '40333'
where OpenPO is a yes/no field and [GPO Invoice Number] is a string

View 6 Replies View Related

Forms :: Sort Concatenated Field - Runtime 2046 Error

May 13, 2013

I am trying to sort with Docmd.Runcommand acCmdSortAscending

When it tries to sort a concatenated field i am getting the runtime 2046 Error

Code:

Private Sub cmbSort_AfterUpdate()
Select Case cmbSort

Case 1
Me.CompanyName.SetFocus
DoCmd.RunCommand acCmdSortAscending

Case 2
Me.DateCreated.SetFocus
DoCmd.RunCommand acCmdSortAscending

Case 3
End Select

View 3 Replies View Related

Forms :: Unable To Edit / Save Record - Runtime Error 2107

Apr 30, 2014

My database was working fine. Now, if I have to save or edit a record, I get a message Run time error 2107. The value you entered does not meet the validation rule defined for the field or control. I am able to enter and edit new records in the table. I did not change any validation in form. Then it goes to debug mode and highlighted this code (me.recordsource=Listsql - is highlighted)

Private Sub ListSearch_Click()
Dim dBS As Database
Dim Rst As Recordset
Dim Listsql As String
Set dBS = CurrentDb()
Listsql = "Select * from MasterData where employeeid ='" & [Forms]![MASTERFORM]![ListSearch] & "'"

[Code] ....

View 3 Replies View Related

Forms :: Replace 2105 Runtime Error Message With Custom Msgbox

Aug 6, 2014

Having set a table short text field to 'Indexed (No Duplicates)', I have a form which produces a '2105 runtime error' when the user attempts to submit a duplicate value. I would like to replace this default error message with a more user-friendly MsgBox.

My code for the SaveRecord button is:

Code:

Private Sub SaveRecord_Click()
DoCmd.GoToRecord , , acNewRec
MsgBox "Record successfully saved", vbOKOnly + vbInformation, "Record Saved"
End Sub

My code to capture the 2105 runtime error is:

Code:

Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2105 Then
MsgBox ("This villa booking has already been logged.")
Response = 0
End If
End Sub

Unfortunately when the save button is clicked (when attempting to save a duplicate value), the 2105 error still runs. What are I doing wrong?

View 12 Replies View Related

SQL ERROR - Runtime Error 3061 -

Aug 5, 2005

SQL Issue ...

ERROR: Runtime error 3061 - Too few parameters. Expected 1.

------------------------------------------------------------------------

Not sure how to work in the '* ROLL *' into this SQL statement. The query statement works fine ... I have tried different quotation methods ( Not Like " & " '
* ROLL * & ' " & " ) AND .... )

sql = "SELECT DISTINCTROW Sum(CDbl([Scrap Factor])) AS SumOFScrap FROM [RT: Signpro1: Costs] LEFT JOIN [DT: InventoryExtend] ON [RT: Signpro1: Costs].[Part Number] = [DT: InventoryExtend].[Part#] GROUP BY [DT: InventoryExtend].CategoryID, [DT: InventoryExtend].Description, [forms]![signpro sign estima parameters]![combo14] HAVING ((([DT: InventoryExtend].CategoryID)=30) AND (([DT: InventoryExtend].Description) Not Like '* ROLL *') AND (([forms]![signpro sign estima parameters]![combo14])=1));"

ANY HELP WOULD BE APPRECIATED ...

Cheers,
QTNM

View 14 Replies View Related

RunTime Error 75 - HELP !!!

Jul 30, 2005

Hi there,

I'm using the FILECOPY command to copy a specific file on the C drive to a CD.

I have been testing this for ages and it's been working fine. All of a sudden, I am getting a runtime 75 error. WHY???

Thanks in advance,
Paul.

View 1 Replies View Related

Runtime Error 429

Feb 13, 2007

Hi Everyone

Ive created a database using the file system object that creates folders, moves files from one folder to another, etc.

This works perfectly on my home pc, but when i try to install it on the server at work I get the following error message:-

Runtime Error 429

Active X component can't create object

I've had a look on the net and appears that it only happens on certain computers and I wondered if anyone had any quick fixes that they had come across over the years.

Thanks in anticipation

Kindest regards

Tony

View 2 Replies View Related

RunTime Error 0,20,91

Jun 15, 2007

Hi

I am getting Errors: 0,20,91 at the same subroutine
What could be the reason for the error?

Thanks

View 1 Replies View Related

Runtime Error 3320

Jun 1, 2005

"Function is not available in expressions in table level validations"


I keep getting this message when trying to update the value of a text box when using the following code

Forms!frmFinanceProposal!Text940 = Me.Text253

Would someone be able to explain what this message means pls!!!

View 1 Replies View Related

Runtime Error 1004

Aug 31, 2005

Good morning

I had yesterday off work and have come back to a nightmare.

The database we use doesnt work the way it should anymore.

There is a switchboard which gives us the option to show a booking form...Worked fine until someone did something to it yesterday.

When I click on the command button to load the form I get an error saying that there was a runtime error 2001 " You canceled the previous operation"

How do I fix this??? I so confused.

I have tried opening the form other ways but it appears to be locked and wont open.


Please if someone could share some light!!!!


TIA

View 4 Replies View Related

RunTime Error 2105

Jun 15, 2007

Hi

I have this error when on:
DoCmd.GoToRecord acDataForm, "PaycheckTable", acNewRec
Whent I trace with the debugger when the ENTER keyy is pressed event.

If I don't use the debugger I don't see any error.
This problem occurs when I check a specific checkbox and trying to go to a new record (Whith the other checkboxes I don't have a problem).

Another symotom:
When I use the next or new record buttons I don't have any problem.

How can I fix the problem?

Thanks

View 1 Replies View Related

Help With Runtime Error 3131

Mar 27, 2008

i am tring to write a find fun and useing the following code but it keep giving me the error 3131

Please help


If Ponumber.Value = "" Then MsgBox "Nothing To Search": Exit Sub


Set db = CurrentDb

Set rstOrder = New ADODB.Recordset
rstOrder.Open "table1", CurrentProject.Connection, adOpenStatic, adLockOptimistic
Set rst = db.OpenRecordset("Select * From " & table1 & " where PoNumber = ") & Trim(Ponumber)

View 5 Replies View Related

What Is Runtime Error 7225?

Sep 7, 2005

As the topic indicates: what is runtime error 7225?
Thanx for your help

View 1 Replies View Related

Runtime Error '5852'

Jun 1, 2006

Hello All,

Using Access 2003 and Word 2003 on a WinXp Workstation with all SPs and updates.

The code that I'm using is MS standard (see below) and has never previously given me any problems albeit using Access 2000 and Word 2000.

I've searched the MS knowledge base and googled the error but nothing I find seems to relevant to this situation.

It falls over on the '.Destination = wdSendToNewDocument' line.


Can someone help?

TIA,

Mo

--------Code----------


DoCmd.Hourglass True

If CreateWordObj() Then
With gobjWord
.Visible = True
.Documents.Open "d:screening emplate.doc"
DoEvents
With gobjWord.ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.Execute
End With
'.ActiveDocument.PrintPreview
.Visible = True
End With
End If

DoCmd.Hourglass False

View 3 Replies View Related

Runtime Error 94 - Help / Confused

Jul 14, 2006

Hi,

I created a database for someone at work, with the main point of it being for someone to enter a date in one field, and then 13 weeks from that date, it ticks a box, and then 26 weeks from the date inputted, it ticks another box.

Now, all was working fine, but today she came to me and showed me an error that keeps appearing.

What happens is when she creates a new record on the form, if she doesn't input either a date (so the above formula can work), or the persons name in the appropriate field, a Runtime Error 94 appears, which I think says 'Invalid Use of Null', or something along them lines.

I've looked at the coding, and am a bit stuck (bare in mind I don't know a great deal about coding).

From memory, in the coding, the database looks at the date inputted, then adds 13 or 23 weeks to the date, and ticks when it gets to that point. However, if this date isn't inputted, that is when the run time error appears. I have no idea at all why this happens when the name isn't inputted.

If it's any help at all, the bit that is highlighted in yellow in VB, when I click debug, is as follows:

dStart = Me.txtStartDate

Underneath this it has the formula that adds 13 weeks to that date, and then the same but for 26 weeks.

I'm guessing I need to tell it that when there is nothing inputted in the date field, it doesn't have to do the formula. It doesn't like having nothing in the date field.

Apologies if that makes no sense.

If anyone at all can help, it would be much appreciated.

Cheers

Dan

View 8 Replies View Related

Error In Making MDe

Nov 15, 2007

Hi guys,

I am having error message when I tried to make my mdb file to mde. The error message is "MS Access unable to create an MDE database". Reading through the help message it says that this problem always occurrs in trying to compile large db into MDE. So what can I do to solve this problem. Also what is MS access memory capacity. thanks

View 6 Replies View Related

Weird Access Runtime Error

Jun 15, 2006

I have been writing databases for several years now, so I know my way around access pretty good. I have come upon a strange error though. which is confusing me to now end. I wrote a Database on my work machine which has the latest version of MS Access and SP2 for Office. I just tried to send it to another employee for them to test. Now they do not have the full version of MS Access installed on their machine, they only have the runtime version which only runs the Database. The load works fine and the first screen uses ADO to lookup some value and display them in a list box, nothing crazy, everything works fine. Now using this form, when they click a button the info in the list box is used to set the Fields a new Unbound form. And this is where the error happens. The on_load event of the form fails for some reason, and gives a msgbox which says, "Runtime error occured and the App needs to close", but the prog works fine on my machine. I am baffled. The file is a MS Access 2000 format, I tried changing it to MS Access 2002/2003 Format, and when I do that they cannot open the file because it says they do not have thje latest MS Access version. I have no idea what, why the error occurs, any ideas??

View 1 Replies View Related

How To Mondify RunTime Error 2113

Jun 16, 2007

I need to know how to mondify the message text of RunTime Error 2113 when the user type invalid value in the date field?

View 2 Replies View Related

I Just Want To Create A Recordset (Runtime Error 424)

Jul 21, 2007

Why does the following code generate an error. All i want to do is open a recordset which I thought would be straightforward. (novice Programmer, new to access vba). The set statement in the ComboProduct event generates the error.

Option Compare Database
Dim Company As String
Private dbaProposal As DAO.Database
Dim EffectiveDate As Date
Dim Product As String
Private rstProposal As DAO.Recordset

Private Sub ComboProduct_AfterUpdate()
Product = ComboProduct.Value
Set rstProposal = dbsProposal.OpenRecordset("SELECT * FROM Proposals WHERE Proposals.[Group Name]='" & Company & "' AND Proposals.[Effective Date]=#" & EffectiveDate & "# AND Proposals.Product='" & Product & "'")
End Sub

Private Sub Form_Load()
Set dbsProposal = DBEngine.OpenDatabase("Database1.accdb")
End Sub

View 2 Replies View Related







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