Error 2465 With Subform Naming Convention!
Jan 25, 2006
I've searched and experimented, but to no avail...
On a form (frmWorkOrder) , I want to “call “ a property on a subform (Named sfrmDocument). In order to disable that subform.
Thus far I’ve narrowed the error to:
Me!sfrmDocument.Form.Enabled = False
Me!sfrmDocument.Form.Locked = False
This seems to be the way that http://www.mvps.org/access/forms/frm0031.htm would handle it. Someone's suggestion and it seemed to work before ...
Maybe I’m reading it wrong!! At any rate, I get the error 2465 Application defined or object defined error.
Am I forgetting something ? Help!!
View Replies
ADVERTISEMENT
Jun 8, 2015
I would like to add the "Month" of the information queried to my file name at export if possible. I included my current code and an example of how I would like the title to read.
DoCmd.TransferSpreadsheet acExport, 10, "tblStarzIncentivePayoutExport", "C:StarzExportsIncentive Payouts" & " " & "Ran" & " " & Format(Date, "mm-dd-yyyy")
I would like the file to be named:
Incentive Payouts "Month out of the date ran in the query" Ran 06/08/2015
Is it possible to do?
View 1 Replies
View Related
Mar 11, 2006
one of my fields is called
partner road
in the class module when i enter me!partner_road I get a run time error 2465 cannot find field
what do I enter for the field name?
thanks
View 2 Replies
View Related
Feb 14, 2006
I have a form that contains a field with an On Click event procedure to send the value in that field to a corresponding field on a subform attached to another form. Does that make any sense? The On Click procedure looks like this:
Private Sub FieldNameonCurrentForm_Click()
Forms!frmMainFormName!fsubSubFormName.Form!txtFiel dName = me.FieldNameonCurrentForm
End Sub
I’m not quite sure what I am doing wrong. I am getting the Run-time Error ‘2465’ and it is pointing out that it is unable to find field ‘fsubSubFormName’. I have double (and triple) checked the names and I have not misspelled the names of the form or subform. Did I set up the event incorrectly? Could it be that I am not calling the subform the correct way? Any ideas? .....
View 1 Replies
View Related
Nov 17, 2006
hi,
I am new to this forum and to MS Acess. i am not a software engineer or in the field of software. I had to learn as much as i could about MS Acess because of a project i worked on. I have a standalone MSacess database and one of the forms is giving me trouble when I try to enter a new record
The form is called frm_fragrances and has information about a fragrance.
the frm_fragrances has 4 fields in it and a sub form. the sub form has details about the fragrance
In a new record when I enter the 4 fields and attemt to go to the subform which has details about this fragrance I face this error.
an unexpected error haas occurred @2465: application defined or object defined error.
additional information
Active form:<frm_fragrances>
Active control:<txt_VendorName>
Previous control:<frm_fragrances>@Please call the developer for further instructions
I have looked in the FAQ and on this forum for help on error 2465 and cannot find anything to help me. I can work with forms to an extent but cannot write too much code.
I would really appreciate some help in this matter
Thank you
View 4 Replies
View Related
Nov 1, 2004
We have an old computer that is going to be used as a simple signin and out book for volunteers. We want to restrict people on that computer from doing anything else
I have designed the form, and it is nice and evil in that it doesn't allow you to close it (cancel = true in the forms unload event) or even quit access without killing the process manually with the old ctrl-alt-del (or ctrl-shift-esc) it starts on startup and I have disabled the windows key (using XP so I had to add a binary value to the registry manually)
The problem is they can still alt-tab out of there (despite a NoWinKeys registry key that was supposed to stop that), and they can still change the main access window's size and access the start menu.
The network and local profile is such that they can't do a whole lot if they do get past the form, but there should be a way to stop them from leaving... some sort of API that will regain the focus, then I could just check that the application had the focus every second, and pretty much render the computer un-usable
Any ideas?
Thanks in advance
-mwalts
View 3 Replies
View Related
Dec 18, 2006
hi guys i was wondering if you can help me this is my code: i have a main form with this code, this form contains a subform linked by the All_PricingID
Set rst = CurrentDb.OpenRecordset("tblAll_Pricing") 'main table
' adding data to the table
rst.AddNew
' Main table
rst!All_PricingID = Me.txtPricingID 'Main table pk
rst!MainContract_ID = Me.cmbMainContract 'combo box in parent form
rst!ItemNumber = Me.txtItem 'Main form text
rst.Update
'sub Table
Set rst2 = CurrentDb.OpenRecordset("tblPricing") 'sub table
For varItem = 0 To Me.lstsubContracts.ListCount - 1 'this is a list in the main form
'--- loop through all the items in the list box and create a new row in the subform for each subcontract in the listbox lstSubcontracts.
rst2.AddNew
rst2!ID = Me.All_PricingID 'sub table foreign key
rst2!SubContractID = Me.lstsubContracts.Column(0, varItem) 'sub table
rst2.Update
Next varItem
'--- close the tables
rst.Close
rst2.Close
Set rst = Nothing
Set rst2 = Nothing
the subform appears correctly with the rows i wanted added but i need the user to be able to edit a column in the subform for the rows just created (my form is on datasheet view). but everytime i move to cursor into the subform, i can't even scroll up and down.
i keep getting an error that says :
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. (Error 3022)
but when i check my tables tblAll_Pricing and tblPricing , everything is inserted correctly according to my recorset above, do you know why this is happening? and why i am not able to edit my subform. my subform allowsedits and additions.
help!!
View 2 Replies
View Related
Mar 25, 2006
All,
I try to use common naming conventions wherever possible.
Every now and then I come across what should be common but I can't find a standard method to use.
It not really a huge problem, but as this is the General forum I thought I'd ask.
Does anyone have a good link with a long list of conventions?
http://www.mvps.org/access/general/gen0012.htm
http://www.databasedev.co.uk/naming_conv.html
http://www.acc-technology.com/namconv.htm
Are all good places to look.
Does anyone have a standard way to name a table which permenantly resides in the client but the data is very much temporary.
I use these tables a lot and was just interested.
No matter if there isn't one, just seems a good idea to open up a discussion for anyone else who wastes time like I do on the name of objects etc. rather than doing the work:-)
Any and all ideas on the subject most welcome.
Cheers, I hope this becomes a useful thread.
View 12 Replies
View Related
Jul 24, 2007
Following on from entries in a previous post (see http://www.access-programmers.co.uk/forums/showthread.php?p=612071#post612071 ) I wondered what people considered to sensible naming conventions.
For example should a table be called "Order Details", "Order_Details", "OrderDetails" or "tblOrderDetails".
Should variables in VBA be given a prefix which indicates their type eg strString or intInteger etc.
Lets have your views.
View 14 Replies
View Related
Apr 15, 2005
When I started using Access excel had been my closest app. to a database.
My first attempts to build a database failed because I tried to build the database like sets of excel sheets.
Any ways I then discovered Normalization, that helped a lot.
Now I am wondering about naming rules.
I have seen a few examples like:
ThisTableName,
strThisFieldName,
this_field_name,
Is there one standard or method or is this just user preference?
View 7 Replies
View Related
Jan 25, 2008
Not only do a lot of people not format code (nothing a copy/paste dump of 300 lines with no spacing), they use control names like textbox1, combo47, and form12. It drives me bonkers. This is in part from Expert One-on-One Microsoft Access Application Development. Please read it and understand it. (The book isn't bad either.) Reagrdless of whether or not you agree with it, the point here is that you use some sort of naming convention, even if it's not this one as variants exist. Without it, maintaining your code is exponentially harder, and asking for help in here without some sort of standard convention is far less likely to get a response.That is all. :)Leszynski Naming Conventions (http://en.wikipedia.org/wiki/Leszynski_naming_convention)
View 4 Replies
View Related
Nov 4, 2005
Hi,
I need to name my field in my select query
i.e : - name: [...
but instead of it just being text, i need it to calculate its name by month i.e
Month([Starting date:])+1
On my query i ask the user to input a starting date and i then work out information based on that. How can i name the a calculated month
Thanks
k0r54
View 1 Replies
View Related
Dec 12, 2007
i have the following code and it works fine makes a xls called trash
now i want to be able to name the xls myself (via a form)
form called xlsexport
and the field i wil have to name it willb e called xlsname
is it a simple case of
objActiveWkb.Worksheets(1).SaveAs FileName:="c:[form]![xlsexport]![xlsname]- this doens't sound right to me ??
code below( yes theres some bits in there i need to tidy i know)
Private Sub Command0_Click()
Dim dbs As DAO.Database
Dim rstGetRecordSet As Recordset
Dim objXL As Object
Dim objCreateWkb As Object
Dim objActiveWkb As Object
Set dbs = CurrentDb
Set objXL = CreateObject("Excel.Application")
Set objCreateWkb = objXL.Workbooks.Add
Set objActiveWkb = objXL.Application.ActiveWorkbook
objXL.Visible = True
objActiveWkb.Sheets.Add
objActiveWkb.Worksheets(1).Name = "Trash1"
Set rstGetRecordSet = dbs.OpenRecordset("Trash")
objActiveWkb.Worksheets("Trash1").Cells(1, 1) = "test"
objActiveWkb.Worksheets("Trash1").Cells(2, 1).CopyFromRecordset rstGetRecordSet
' note replace names with correct qry
'objActiveWkb.Sheets.Add
'objActiveWkb.Worksheets(2).Name = "ABC"
'Set rstGetRecordSet = dbs.OpenRecordset("ABC_Query_Name")
'objActiveWkb.Worksheets("ABC").Cells(1, 1).CopyFromRecordset rstGetRecordSet
objActiveWkb.Worksheets(1).SaveAs FileName:="c: rash.xls"
objActiveWkb.Close
Set objActiveWkb = Nothing
Set objCreateWkb = Nothing
Set objXL = Nothing
rstGetRecordSet.Close
dbs.Close
Set rstGetRecordSet = Nothing
Set dbs = Nothing
View 4 Replies
View Related
May 22, 2006
Hi folks,
What is the abbreviation you use in MSAccess when naming combo boxes?
i.e a label is abbreviated using lbl.
Memory blank so appreciate some help thanks!
View 2 Replies
View Related
Apr 25, 2013
Is it possible to set a naming convention for auto numbered records?
For instance in a table that holds information on customers, could you start the auto number scheme at something like 'cust01' rather than the normal autonumber scheme that's starts at 1 and continues.
Just so I am absolutely clear, table could be:
Customer_ID
First_Name
Last_Name
cust01
Ben
Robinson
cust02
Dom
Rodgers
cust03
Lilly
Balentine
cust04
Luke
Teal
rather than the normal:
Customer_ID
First_Name
Last_Name
1
Ben
Robinson
2
Dom
Rodgers
3
Lilly
Balentine
4
Luke
Teal
View 1 Replies
View Related
Jan 20, 2015
I'm looking to design a form in Access that has a documents number field. Ideally, this field would auto-generate a document number based on a logical naming convention.
View 7 Replies
View Related
Jan 8, 2014
I have a Database in which I would like to archive data once it is now longer actively being used. I have VBA code that does everything i need it to, however I would like to name the new archive table related to the dates in the data being archived. Below is the code I am using to archive and delete the information from the main table.
Code:
Dim strSQLCreate As String
Dim strSQLDelete As String
Dim strArchiveTableName As String
[Code].....
I know it will be in the "strArchiveTableName" variable, I am just not sure how to pull the dates out of the data being moved. The TestData table holds a date and time for each test, and the earliest and latest dates is what i want to append to the table name.
For example: Currently "tblTestData_A102Archive"What I want "tblTestData_A102_1/1/2012-1/1/2013"
View 3 Replies
View Related
Dec 19, 2012
Im putting up my Access table/query names for critique, because at some point Ill have to hand over this database to someone else and I want to see how they might react. So if you opened a query list and saw the list below, would you be able to find your way around, or are there too many similar looking queries?
Some of the queries are made up of 6 or 7 of the other queries. I find its easier to see what going on if they are separated out into individual queries, rather than throwing them all into a single select statement, and it means I can re-use things that I know work.
I get stuck on using plurals vs singular (e.g. StoresDeductions or StoreDeductions); how much detail to put in (e.g. BrokersChainsStoresCasesByMonth); how to indicate totals or being grouped by e.g. month; how to indicate date parameters, i.e. whenever a query says MonthRange it asks for this range, and any queries built on top of this one also have MonthRange in their name.
Code:
AccountsTotalNumStores
BrokersChainDeductionsMonthRange
BrokersChainDeductionsMonthRange_Crosstab
BrokersChainNumStores
BrokersChainsTotalsByMonthRange_Crosstab2
BrokersChainTotalsByMonth
BrokersChainTotalsByMonthRange
BrokersChainTotalsByMonthRange_Crosstab
BrokersChainTotalsMonthRange
[code]....
View 4 Replies
View Related
Feb 12, 2013
I'm not talking about naming conventions as in tblThis or qryThat, but I have 100+ queries, many of which do similar things from slightly different angles - e.g. a query that gives the total sales per store per month; the same query but per store per product per month; the same query but per sales manager per store per month etc. And these are then used in queries further up the tree that also have similar but slightly different results.
So is there an example database anywhere that I can download that has a decent amount of queries, and a sensible naming convention? I think I'm tying myself in knots because I have only a few tables but lots of queries (for data analysis), whereas most databases I see have lots of tables and a handful of queries.
View 4 Replies
View Related
Oct 23, 2013
I'm currently working with Access 2007 building a way to create PODs to clients. I have most everything laid out, one problem I can't seem to get around is naming the file the SOW #. Below is the code:
Function Run_all_PODs_01()
Dim myPath As String
Dim name As Object
DoCmd.OpenQuery "Q5 SOW bill requested data points all", acViewNormal, acEdit
DoCmd.OpenQuery "Q5 SOW bill requested All 01", acViewNormal, acEdit
[Code] ...
I can't seem to get the name to equal the SOW number.
The table that I'm trying to reference is "SOW bill requested data points" it is a basic table one row with a column header as SOW #. I'm not sure how to tell it name the file that data point in the column.
View 4 Replies
View Related
May 28, 2013
I have taken over exisiting databases and the names for the tables,forms,queries,reports are not technically named correctly.. What would be the easiest way to rename everything accordingly:
tbl for table
qry for query
rpt for report
mcr for macro
bas for module
frm for form.
Of Course they have names but it is hard to tell when viewing a query for instance if you are looking at a table or a query.... in the SQL View.
View 14 Replies
View Related
Aug 19, 2013
Been hunting a round looking for some code that will output my access report to excel but more inportantly add a unique field from the report to the name of the file. example would be [FileName] & [ReferenceNo].xls.
View 2 Replies
View Related
May 10, 2014
I am exporting a single record to a spreadsheet. The code I have works fine. The problem is I want to have the spreadsheet contain the information that is in one of the forms textboxes, in this case a dogs name.
I have created a query to get the dogs name which works but I dont know how to get that query to run and then be put in the file name.
The code that I have is below
Code:
Private Sub btn_ExportDog_Click()
Dim strday As String 'The date
Dim sDest As String 'Where the file will be copied to
Dim sSource As String 'The name of the file to be copied
Dim strDogName As String 'The name of the dog that is geting exported
Dim strBackUp As String
strBackUp = "c:GPandDetectionDogTrainingLogBackUp"
[Code]...
View 1 Replies
View Related
Jun 13, 2013
Is it poor practice to name form controls with the same name as the field names?
View 5 Replies
View Related
Apr 21, 2015
I need to create a word file (it needs to be word) based on template (not a very complicated template) max 1 to 1 and 1/2 pages long.
the word doc needs to be named from the recordset but for now assume 12345.doc and the next one will be 12346.doc etc (I have a unique number system - available from tables /query .
i can either make the word doc in code or use a template (template would be better) recordset could have 20-30 in it each time i run it - but to be run every week
second half is how to email this out. i had in mind a email system
email to . test@testhotmail.xyz
file attach = this folder where the docs are store and attach 12345
in a loop
so either
create word file - email word file in a loop each time or create all the word files and then send them individual
View 4 Replies
View Related
Apr 30, 2014
I want to hit a button and then it scans for a file on a server and return with a message box saying if it exists or not.
I want it so when I am on a Specific record it will search for certain requirements.
All the file names are pdf files with the same naming structure
SIT yy m(m) dd Last Name Unique Identifier
Example:
SIT 14 5 21 Smith ABCD1234567
SIT 14 10 21 Smith ABCD1234567
So I hit the button it sweeps the file path and looks for documents with this naming structure.
Last Name and Unique Identifier are fields within the db.
Last Name = txtLName
Unique Identifier = txtUniqIden
So far I have the following:
Code:
Dim strDirName As String
Dim strDirPath As String
Dim strDirName As String
Dim strDirPath As String
[Code] ....
So Far it works and I used the actual name of the items an it finds them but I need to up each record.
I have no clue how to begin with the strDirName. How to get it to scan the file name in a specific format.
View 3 Replies
View Related