Group:  Microsoft Access ยป microsoft.public.access.modulescoding

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Threads Replies Last Post
17 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  
Data type mismatch in criteria expression
I have a autonumber field in master form which is my ID field. In my subform, I use FINDFIRST with a criteria string (which is my ID field). I run into this error message. I am pretty sure it is because the ID field which is autonumber. When I remove it, it runs without error. Here is my code strId=me.parent!id stCriteria= "[id]= ' " & strId & " ' " Me.RecordsetClone.FindFirst (stCrit...
2 13.06.2006 01:40:12
SQL WHERE Statement error
Can someone tell me what the error is in the following statement. I get an error " Syntax error in string in query expression" C_State = 'AL' AND C_Zip = '01060' AND (((IIf([tblDonation].[D_LName] Is Null Or [tblDonation].[D_LName]=' ',[tblDonation].[D_FName],[tblDonation].[D_FName] & ' ' & [tblDonation].[D_LName]))='Matt Smith')) I have been toying with this for a while and can't g...
3 09.06.2006 21:34:45
Trim cr lf from string
I have a string which may end in cr/lf. Or may, in fact, end in tab or any other non-printing character. "Trim" does not remove cr/lf. Would anyone like to suggest an optimal solution for trimming strings back to visible characters? (david) ...
19 09.06.2006 18:22:30
Word Merge and Multiple Instances of MS Access
The following code from MS KB 209976 shows the following code: Function MergeIt() Dim objWord As Word.Document Set objWord = GetObject("C:\MyMerge.doc", "Word.Document") ' Make Word visible. objWord.Application.Visible = True ' Set the mail merge data source as the Northwind database. objWord.MailMerge.OpenDataSource _ Name:="C:\Program Files\Microsoft " & _ ...
5 09.06.2006 09:31:46
Programmatically create an Autonumber Field using FieldDef
Hi gurus! I am using code to generate 2 related temporary tables. I want to use an Autonumber field in the first which is used as the Foreign Key in the second. How do I create the field definition using the FieldDefs objects to be an AutoNumber Field type. I can do the following:- Set ltdfDestination = mDb.CreateTableDef("temptable1") Set lfldDestination = ltdfDe...
4 09.06.2006 01:09:34
RE: Case Select
I'm trying to learn: I have three text boxes: a)Unit , which has 14 possible choices; b)Referral A, Rerral B, and Referral C, which takes a number; and c)Employee, with 7 possible choices; I thought a Case Select would work, but don't know the syntax. End result should answer the question: If Unit is (this), and Referral is more than 1, then Employee is (this). I need the syntax s...
2 08.06.2006 17:28:07
Containers/Documents...What do they do?
I found this code for transferring objects from one database to another. http://support.microsoft.com/?kbid=298174 I am at a loss as to what the containers and documents code at the end is for. What is that code doing? TIA; Amy ...
5 06.06.2006 04:50:13
Call Internet Explorer from within an Access Event Procedure
I have a field that holds an integer representing a ticket number. When a particular button is pushed I would like to call Internet Explorer with the web site address including the appended ticket number from the field. http://myserver,com/mysite/inquiry.aspx?Inq=[contents of ticket_number_field] For example, for ticket 2000 the button push would call IE with http://myserver.com/mys...
4 05.06.2006 22:15:18
How Do I Drain KeyBoard Buffer
What is the equivlant of INKEY in Access Visual Basic? I want to drain the keyboard buffer of any previous SendKey sent characters. Thanks....
2 04.06.2006 03:52:30
Add date to copied mdb
Hi. I use the sub below to compact my db and for backup. Private Sub Backupcmd_Click() destFileName = destFileName + ".mdb" If Len(Dir$(destFileName)) > 0 Then Kill destFileName Call DBEngine.CompactDatabase(srcFileName, destFileName) Else Call DBEngine.CompactDatabase(srcFileName, destFileName) End If MsgBox "Backup Complete", vbInformation, "Flower Matrix" End...
3 03.06.2006 02:15:22
TransferDatabase
Is there a way to use TransferDatabase to copy more than one object at a time of a given type, or do you have to loop through all objects and issue an individual command for each? TIA; Amy ...
2 02.06.2006 21:01:08
Balancing percentages and/or money
Could you share code, process or an algorithm to balance percentages so when they are added together they equal 100%, without those lingering fractional decimal places? I have a module which rounds the percentages to a specific decimal place. But when there are 5 or so percentages, the sum always seem to be off 1 or 2 decimal places because the way they rounded. As always, Thank you...
4 02.06.2006 16:24:26
Help with code please
Hi all, It may sound trivial question, but I`m really "green" when it comes to vb programming. I`m using Access 2003 on WINxp. I a form with 2 txtbox, next to them I want to put a button that open the select file dialog. when the user choose the file, the txtbox populate with the path. I tried to use the API from here: http://www.mvps.org/access/api/api0001.htm, but I get error...
6 02.06.2006 06:21:01
UPDATE query fails in command exicution 'JOIN expression not suppo
I have 2 copies of a database and want to make sure that the records in the new version's tables are the same as the old version. I have no problem writing code to INSERT INTO new records and to DELETE removed records. However, I can't get my UPDATE quiery to work. In testing, I have copied a matching table TestOld into the new database and can generate a query in the new database that p...
8 30.05.2006 19:40:02
mid
I have a routine that splits out letters from numbers entered into the same field... actually it's like this... fields may contain nulls, or 3A or A12 etc. So I added a number and a letters column to the table and then use this little routine to load either or or both depending... or nothing as the case could be. Then later I try and combine numbers and letter and street and street ty...
7 30.05.2006 15:02:01
Currency to word
Hi, is there a module for converting currency to word? SF ...
3 30.05.2006 03:23:01
Running on different drive letter
Hi, I'm wanting to run an Access database that's been written on a local C:\ drive as opposed to the N:\ drive it was first written. I could search and replace the code N:\ with C:\ but wonder if there's a VBA code solution that knows the drive being used and thus I'm not restricted to hard coding. The example below is typical of where N:\ appears. strSQL = "DELETE FROM MBA;" ...
5 29.05.2006 11:07:40
Public variable
Hello all, Possibly simple but I can figger it, where do I need to declare a public variable or constant (like stPath="C:\My data"), so that is loaded when the DB opens and can be used thrue out the application. Thx, Ludovic ...
5 27.05.2006 23:37:50
acwzmain.mde
Hi Folks, I'm trying to start the Simple Query Wizard so a user can access unhidden tables. I can start the New Query dialog with DoCmd.RunCommand acCmdNewObjectQuery which includes the Simple Query Wizard as an option, but I just want to start the Wizard without diplaying the New Query dialog. I've tried the following but it fails with 'Invalid Argument' Dim RetVal As Double ...
4 27.05.2006 12:53:01
getting rid of duplicates
Hi, I have a table with some 60000 records many are duplicates. Is there an easy way to sort the records by Post Code, and Establishment name, and then just automatically delete duplicates? Thanks A ...
2 26.05.2006 13:55:27
find where a query is used
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C68017.BC9F56C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is there any way to find all the places where a query is used? Queries, = Forms, Reports, and VBA. =20 VBA is easy - do a find The others are of interest to me. Thanks, --=20 Rick Allison ------=_...
2 25.05.2006 21:45:46
How to get/set enabled/visible settings
I have a very busy form with loads of buttons (and textboxes/labels etc etc) some visible and some enabled and others with a combination of these properties set and unset. Every now and again I will debug a particular piece of code and then when I close the form I save settings. Of course all the controls enabled/visible settings now reflect their state as at the time i closed and sa...
6 25.05.2006 20:31:29
controls property for a form
Is there a way to iterate through the controls on a form and gather the enabled, visible and name properties. I have tried this but I get an error. I need to find an ancestor class that has these three properties defined and available. Any ideas anyone? thanks, jON On Error GoTo 0 Dim Control As AccessObject For Each Control In Me.Controls Debug...
3 25.05.2006 18:53:15
FindWinfdow Problem
When I run the code below, I get the error message "Can't find the dll entry point FindWindow in user32". I changed "user32" to "user" and then it says it can't find "user". This is a Win XP box. What do I do? Thanks. ------------------------------------------------------------------------------ Private Declare Function FindWindow% Lib "user32" (ByVal lpClassname As Any, ByVal lpCaption As...
5 25.05.2006 18:52:02
Creating tables on the fly with SP, not seen in Access
I'm working on an app for a Client. I work via Tarminal Services. I have a stored procedure that creates a table. Once created I'm using TransferSpreadsheet to create an Excel file which works fine. The client runs the same piece of code directly from her machine...TransferSpreadsheet generates an error stating that the object (the table that was just created) does not exist. If...
8 24.05.2006 18:36:12
17 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net