f



HELP!Unable to run macros in ms access database FROM VB

Iam unable to run a macro from visual basic...
The code does not work when the ms access database(any database ) is open...
HELP!


Dim strDbName As String
Dim strlvsendkeys As String
Dim Objaccess As Object
   strDbName = glopath
    If User_FAS <> "" Then
    strlvsendkeys = "+{TAB}{DELETE}" & User_FAS & "{TAB}"
    If Pwd_FAS <> "" Then
         strlvsendkeys = strlvsendkeys & Pwd_FAS
    End If
        strlvsendkeys = strlvsendkeys & "~"
    End If
    DoEvents
    SendKeys (strlvsendkeys)
  
 Set Objaccess = GetObject(strDbName, "Access.Application")
 Objaccess.DoCmd.RunMacro "mcrValidateArchiveClaims"
 Objaccess.DoCmd.RunMacro "mcrCheckModulesArchive"
 Objaccess.DoCmd.RunMacro "mcrCheckCentreArchive"
 Objaccess.DoCmd.RunMacro "mcrCheckMInfoArchive"
 
 
 Set Objaccess = Nothing

Regards,
Arch
0
archana (1)
7/27/2004 8:53:52 AM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

0 Replies
868 Views

Similar Articles

[PageSpeed] 5

Reply:

Similar Artilces:

Running a ms access database with access 2003 in Vista
I have a Database that I am trying to run on a new vista computer. Up to now I was running it on a win 98 computer and using access 2003! I installed access 2003 and I can make it run and view the data but I can not save any new records. Has any one seen this problem yet? Thanks Clarence Wollman On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewollman@gmail.com> wrote: Do you have the same problem with the Northwind sample application? (search your computer for northwind.mdb) -Tom. >I have a Database that I am trying to run on a new vista computer. Up >to now I was running it on a win 98 computer and using access 2003! I >installed access 2003 and I can make it run and view the data but I >can not save any new records. >Has any one seen this problem yet? > >Thanks Clarence Wollman On Aug 22, 7:29 pm, Tom van Stiphout <no.spam.tom7...@cox.net> wrote: > On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewoll...@gmail.com> > wrote: > > Do you have the same problem with the Northwind sample application? > (search your computer for northwind.mdb) I don't have a problem opening and editing the northwind.mdb. Thanks Hi I found a workaround. This database has a fronted and a backed. When I link them in the linked table manager, I was going threw the network to my computer. The reason I am doing this is when any networked computer opens the shortcut to the front end of this computer the linked table manger knows...

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but I don't know what software is >needed. Do you know? If so, please answer this post. Thanks. I think it comes down to semantics. "Licensed" vs "Loaded". No you can't create an app that will run on a PC with nothing loaded. Yes you can create an app that will run on a PC where nobody's paid the fee to run MS Access. You still have to install something on that PC, however. What it is is a freebie version of MS Access that only runs applications - doesn't allow anybody to develop an app. You develop the app on your PC, which has MS Access installed. Then somebody installs the freebie ("Runtime Access") on somebody's PC and they can run the app you developed without having to pay any money to anybody. -- PeteCresswell Sue, If Access isn't present, some version of it must be installed to run an Access database. VB.NET, ...

Fire-up MS Access Database from VB and Leave it Running When VB App is Closed?
Hiya, Anybody know how to do this please? I am opening Access from VB using the code below. However, I don't want Access to close when objAccess goes out of scope. I would like Access to remain open - like MS Excel does if you write similar code. I am trying to avoid using the Shell function because I don't want to have to search for MSAccess.exe first. If you step through the code and click on the Access session before continuing through the VB code, it seems to know that you have interacted with it and leaves Access open. I have tried throwing in an AppActivate "MsAccess"...

MATLAB command to access MS Access database
Hi! Is there a MATLAB command which gives access to a .mdb MS Access database or do I need a special driver? Thanks, Andree Hi Andree Ellert, you can use activeXcontrol to interact with MS-Access database. access = actxserver('Access.Application'); returns the handle for Access. set(access, 'Visible', 1); will show the opened Access window. use get(access) and set(access) commands to find the methods available to call. -Vadivelu M =========== http://www.mathworks.com/access/helpdesk/help/toolbox/database/datatool.shtml "Andree Ellert" <ellert@gmx.net/////\\\\\> wrote in message news:eed9874.-1@webx.raydaftYaTP... > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree Andree Ellert wrote: > > > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4045&objectType=file> -Hardik ...

Access MS-ACCESS database on server from client????
I m currently developing a java based application and want to know how can i make client access database located on the server? "HeMan_Speaks" <Lunar20092010@gmail.com> wrote in message news:d71ce567-0434-48b8-b1d2-bb191706ab45@w8g2000prd.googlegroups.com... >I m currently developing a java based application and want to know how > can i make client access database located on the server? I think you're going to have to expand a little bit more in your question here, as is not 100% quite clear what you're trying to do. You might want to make a little bit of a distinction between MS access, the development system that allows you to write code, build forms, and build reports, and that of the database engine that you choose to use with MS access. When you build an application MS access, you then choose your database engine, that might be oracle, SQL server, or perhaps more often leave the default jet database. So when you say make a client access application, are you talking about a piece of software that you plan to install and each computer? The fact that your introducing the issue of java further complicates your question. Perhaps your question is simply you have some java code running on a server, and with to open a mdb file (an access database file). In this situation you're not really using MS access at all here (you using what is called the jet database engine to read that mdb file). For all the trouble in this type of sce...

request for explanation on access an database in ms access
This is the code that I found on the internet for accessing an ms access database: import java.sql.*; class Test { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // set this to a MS Access DB you have on your machine String filename = "d:/java/mdbTEST.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="; database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end // now we can get the connection from the DriverManager Connection con = DriverManager.getConnection( database ,"",""); } catch (Exception e) { System.out.println("Error: " + e); } } } What I don't understand is the declaration of database. What I did was putting the database in the same dir as the sourcecode and use "jdbc:odbc:CafeJolt.mdb". But this doesn't work. And the above code does, why is that??? Actually it's not Java question. It's ODBC question. You have to have ODBC connection. Depending of Windows it's usually something like this (for my Windows 2000): Start->Sttings->Control Panel->Administartive Tools->Data Sources(ODBC)-> User DSN -> [Add]-> Driver to Microsoft Access(*.mdb) === And here, finally you can choose file name. ...

Accessing a MS Access database across two servers
Hi The technical support guys at my company have set up my system so that the server containing the MS Access database is on one server, while the pages that should access the database are on another server. When the pages and database are on the same server, I usually just connect through ODBC. The problem is that I don't know how to set up an ODBC connection to link from one server to a database in another. Anyone know what I am getting at and know of a possible solution, or a link to a site which may help. thanks in advance Brendan "Singularity" <Brendan.Collins@Singularity.co.uk> wrote in message news:1118749208.204709.287950@g49g2000cwa.googlegroups.com... > Hi > > The technical support guys at my company have set up my system so that > the server containing the MS Access database is on one server, while > the pages that should access the database are on another server. > > When the pages and database are on the same server, I usually just > connect through ODBC. > > The problem is that I don't know how to set up an ODBC connection to > link from one server to a database in another. > > Anyone know what I am getting at and know of a possible solution, or a > link to a site which may help. > I think this may be more of a network issue than an Access one. Can you see both servers from your PC? Is there any particular reason why they've been put on different servers? Seems a little odd to...

Accessing MS ACCESS database using Data Environment
HI, I have developped a program in Visual Basic 6.0 using MS Access database. I have created all my reports through Data Environment where I have entered the location of my database file (for e.g c:\project\app\test.mdb) in the Connection properties. I have installed my application on another PC using Package & Deployment wizard. When viewing the reports on the other PC, I have to enter everytime the new location of the database. How can I solve this problem, please? nadia wrote: > HI, > I have developped a program in Visual Basic 6.0 using MS Access database. >...

Best way to access a remote MS ACCESS database
What is the best way, via the internet, to access a remote Microsoft Access database? I was thinking of using VPN, but I thought that I would check here to see if there is a better way. Any suggestions? Thanks Do you mean remotely controlling an Access database, or linking tables over the internet? The first is doable, the second is a recipe for disaster. Remote Control: If your remote OS is Windows XP, you can use Remote Desktop (although only 1 person can access the PC at a time; this will change in the upcoming Service Pack for XP, but that may not help you now). Otherwise, GoToMyPC offers similar services, as does Terminal Server (a component of a Windows Server machine), PCAnywhere, et al. Linking to remote tables: You will almost certainly encounter severe problems with corruption, and your performance will almost certainly be so poor as to be unworkable. I attempted this once, with a web server in Canada and my machine in Augusta, GA. Even tiny data requests on a very well optimized data structure took waaaay too long to process ... it's simply not workable, IMO. Other alternatives would be covert the app to a web-based and place your data on a web server. Access/Jet isn't really designed for those workloads, but running a small site with minimal transactions and users can be done. Otherwsie, consider switching to a more robust data platform like MySQL, SQL Server, etc. -- Scott McDaniel CS Computer Software Visual Bas...

Help setting up Ms-Access Database
I'm hoping that someone here can give me some assistance with a database I'm trying to set up. My skills in Access are fairly basic, and I'm trying to skill up, but some of the stuff is a little opaque. I'm trying to put some data I've got on paper into Access. Recently, I got together with some other people marketing organic produce and offered to do some marketing for us on a coop basis in the city. The idea I had was to have four marketing packages for coop members with different rates and services. For want of something better lets call them P1, P2, P3 & P4 I'm thinking I'll need a table with the packages, and one listing the coop members with their details. In theory, a coop member might acquire another farm (either a new one or one from someone bailing out) and put it on a separate package. Which tables would have to have a relationship? I'm thinking the packages table containing the dat about each package would have to be related via a common field to the coop member table, and there would probably have to be a link between that and the farm table, through common fields -- maybe a unique ID in the coop member table could appear in the farm table and maybe the primary key from the package table could also appear in the farm table as a foreign key. But am I right? I'd also like to create a form that would list an individual coop member's details plus any packages they own and assume that all I'd need to do would ...

MS Access Database Replication from VB
Hello, Have any of you ever controlled MS Access Replication from a VB application? I have a VB6 application where I have to send copies of the underlying MS Access 2000 database in remote areas (no LAN or Internet connections), then get the databases back and synchronize them. Any suggestions, articles, etc. would be greatly appreciated. Bie I have done code in Access which replicates six copies of a database together as an automated process. The same method calls can be run in VB as well. (It is Access 97, but I don't think that makes a difference, s long as the versions of ADO, Jet, etc. are all compatible). In VB, you need to set a reference to the "Microsoft Jet and Replication Objects". You will also need the ADODB library. Then you declare a Replica object, set its ActiveConnection property, and call its Synchronize method. I am leaving out the details, of course, but you can track those down in the usual ways. It made sense in my case to do it in Access, in a file that acts like a hub, with all the other replicas as spokes. This is a fairly standard way of arranging replicated databases. You you will need to go around the circle of replicas twice, to be sure all the changes have a chance to get to all the other replicas. When you synchronize in code, you can go around once in ImportChanges mode, then go around again in ExportChanges mode, to cut down on the replication time a little. This was useful doing it over a LAN; in your case, it might ...

MS Access Database Replication from VB
Hello, Have any of you ever controlled MS Access Replication from a VB application? I have a VB6 application where I have to send copies of the underlying MS Access 2000 database in remote areas (no LAN or Internet connections), then get the databases back and synchronize them. Any suggestions, articles, etc. would be greatly appreciated. Bie ...

Run MS Access database in IFS
I am developing an Access database to print Identification Labels for a plating factory. They will print on a network attached printer. Printing will be initiated by a non-zero value of the "Number Of Labels field, which will then be zeroised by the PC program - when I have resolved the "to journal or not to journal" question. The fact that the company still has dumb terminals which could be used for maintenance of the Jobs file raises a problem over where to run the database itself. Would it possible to initiate it in the IFS as part of the IPL or can it only be done...

Help connect Ms access database
Hello All, I am trying to connect an MS database without utilizing the help of the "querybuilder", I know how to do that using the "querybuilder" but this can't work as I am trying to do an exe file and be able to use it for other pc's that I have. I am doing the following, please correct me if I am wrong, but it is not working at all: dbpath=[matlabroot,'a\toolbox\database\dbdemos\trial.accdb']; conurl = ['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};' ... 'DBQ=' dbpath] conn=database('Trial_now','','&#...

Accessing a passworded MS Access 2000 database in Crystal Reports
Can anybody give me some code that I can put in to my VB6 app to open a passworded Access database in the Crystal Reports 8.5 RDC? I see so many examples - none of which seem to work for me. I am using a native connection in Crystal ( pdbdao.dll). My current code is : Dim Report As New crPrintPreview Dim crTable As CRAXDRT.DatabaseTable Private Sub Form_Load() Set crTable = Report.Database.Tables.Item(1) varpath = CurDir crTable.Location = varpath & "\OrderManager.mdb" CRViewer1.ReportSource = Report CRViewer1.ViewReport End Sub All I receive is the message "Error opening file xxxxxxx etc" and then "Open Database session failed" Appreciate any help! Peter Tyler ...

accessing MS Access database fila via ODBC problem
Hi! I'm trying to connect to a MDB file via ODBC like this: char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; SQLAllocEnv(&env); SQLAllocConnect(env, &hdbc); SQLBrowseConnect(hdbc, (UCHAR*)DSN, strlen(DSN), (UCHAR*)buf, BUF_SIZE, (SQLSMALLINT*)&rcvlen); The function SQLBrowseConnect fails and SQLGetDiagRec returns "IM001 Driver does not support this function" Can anyone help me? Thanks! David On Sun, 10 Jul 2005 12:55:30 +0200, David Siroky <dsiroky@email.cz> wrote: >Hi! > >I'm trying to connect to a MDB file via ODBC like this: > >char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; > >SQLAllocEnv(&env); >SQLAllocConnect(env, &hdbc); >SQLBrowseConnect(hdbc, > (UCHAR*)DSN, > strlen(DSN), > (UCHAR*)buf, > BUF_SIZE, > (SQLSMALLINT*)&rcvlen); > >The function SQLBrowseConnect fails and SQLGetDiagRec returns >"IM001 Driver does not support this function" > >Can anyone help me? > >Thanks! > >David > Hi Maybe you need to post to another group, this one is very VB-based, but 1. Can't you use ADO instead of ODBC? It is a lot ea...

Accessing 2 tables having same name but different databases ms-access
Hi, I have an application with MS-Access as backend and JSP/ tomcat as frontend/webserver. For getting better response time(as access is very slow compared to other RDBMS's), I have split the main DB into two DB's on different disks on my server for better performance.I have kept the table names same but changed the DB names. How do I access tables from both the DB's? This is what I have done; I made different connection to the respective DB's i.e. con and con2. When I want to access data, I am using 2 result sets for retriving data from the tables, but getting no result. Here is my code: rs2_1=stmt2_1.executeQuery("select * from Requests where Status='Released' AND LoginName='"+login+"' order by Req_No"); rs=stmt.executeQuery("select * from Requests where Status='Released' AND LoginName='"+login+"' AND Req_No> 5500 order by Req_No"); So, rs & stmt are for latest records and rs2_1 & stmt2_1 correspond the records from older DB. I think, I'm forgetting some small thing but cant get it. Please advice. What do you mean "no result"? Does "next()" return false for both rs2_1 an= d rs? If you're really trying to improve response time, you should probably be ru= nning the two queries in separate threads ... but as you acknowledge, Acces= s may not have as high performance as other RDBMSs. You would also see rel= iability adv...

MS Access database with a file extension of .mde
Good day: Can you kindly assist me in opening a MS Access database with a file extension of .mde? I get an error message stating "This database is in an unrecognized format". Any help is greatfull. TIA This usually indicates an attempt to open an Access 2000 database in an earlier version. -- MichKa [MS] NLS Collation/Locale/Keyboard Development Globalization Infrastructure and Font Technologies This posting is provided "AS IS" with no warranties, and confers no rights. "mary" <chloemelmom@yahoo.com> wrote in message news:a0a64947.0311151242.4df0c...

MS Access Help: Copying database Relationships
Does anyone know if there's an easy way to export or copy the relationship structure from one mdb to a new one? The relationships in the db are time consuming to reproduce. I am trying to make a copy of a database including all the relationships, forms, queries and modules while still within the original database. This has to be a relatively automated process (button click). Any suggestions? yeah; use ACCESS DATA PROJECTS and you can do this all through TSQL. -aaron Instead of Exporting, make: Get External Data --> Import... All the existing relationships will be imported with the tables. Click on the Options button on the Import dialog window to have more choices. Also, I don't see your need to have made that much crossposting. -- Sylvain Lafontaine, ing. MVP - Technologies Virtual-PC "news.giganews.com" <anthony@cambria.com> wrote in message news:3PqdnaFVzZFht1HfRVn-vw@giganews.com... > Does anyone know if there's an easy way to export or copy the relationship > structure from one mdb to a new one? The relationships in the db are time > consuming to reproduce. I am trying to make a copy of a database including > all the relationships, forms, queries and modules while still within the > original database. This has to be a relatively automated process (button > click). Any suggestions? > > Check out the CreateRelation method in Access Help. There is an example there. I have not done this, ...

Need Help on MLM database in MS Access
I am working on a MS Access database to track the sales of a 3 Tier Multi- level Marketing system. I have created a table to track a new RepID and a SponsorID. I have created a query that will show the Sponsor and all of their reps but I am not sure how to show the reps that the second tier has sponsored. Example: RepID 0011 SponsorID 0010 RepID 0012 SponsorID 0010 RepID 0013 SponsorID 0010 The above is easy but I am not sure how to get: RepID 0014 SponsorID 0013 and his SponsorID 0010 Does anyone have any idea of a good way to do this? Thank you, Brent Brent, It concept, it is a hierarchical data problem. Others here have solutions different from the three I know about. Each solution to this problem has its benefits and drawbacks. Study each one to decide which works best for you. Solution 1: Single table joined to itself and modeling a one-to-many relationship between a row in the table and other related rows in the same table. Solution 2: Two tables, one is the detailed information about each thing in the hierarchy (sales representative in your case) and the other is a two column list of primary keys from the first table that lists which thing in the first table is related to the other and modeling a many-to-many relationship between a row in the first table and another row in the first table. Solution 3: Two tables like Solution 2 but with as many columns as are needed in Table 2 to list each level of the hierarchy. This can make navigating...

Creating MS Access databases with VB (.net)
Hello, I am trying to create MS Access databases using VB .net. I can create MS Access 2000 databases OK but also want to create (using VB .net code) 97 format MS Access databases as well. Was using ADOX but the create statement has no parameters for access format and just creates database to whatever format of access you have installed. --- CODE START --- Dim cat As New ADOX.Catalog() Dim sCreateString As String sCreateString = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Test.mdb" cat.Create(sCreateString) --- CODE END --- Cheers Paul M Let me steal from a regul...

Accessing a passworded MS Access 2000 database in Crystal Reports #2
Can anybody give me some code that I can put in to my VB6 app to open a passworded Access database in the Crystal Reports 8.5 RDC? I see so many examples - none of which seem to work for me. I am using a native connection in Crystal ( pdbdao.dll). My current code is : Dim Report As New crPrintPreview Dim crTable As CRAXDRT.DatabaseTable Private Sub Form_Load() Set crTable = Report.Database.Tables.Item(1) varpath = CurDir crTable.Location = varpath & "\OrderManager.mdb" CRViewer1.ReportSource = Report CRViewer1.ViewReport End Sub All I receive is the message "Error opening file xxxxxxx etc" and then "Open Database session failed" Appreciate any help! Peter Tyler ...

Free JDBC driver to access MS Access database from Linux enviroment.
I'm looking for a free JDBC driver that will allow me to acces a MSAccess database that resides on a Windows server from a JSPapplication that resides on a Redhat Linx server.Any suggestions would be appreciated.Thanks,Tim tim@nocomment.com wrote:> I'm looking for a free JDBC driver that will allow me to acces a MS> Access database that resides on a Windows server from a JSP> application that resides on a Redhat Linux server.> Any suggestions would be appreciated.Sounds like RmiJdbc is a solution.See <http://rmijdbc.objectweb.org>-- Thomas...

Possible to keep MS Access interface and migrate the MS Access to MS SQL Server?
Hello all Would it be possible to migrate the MS Access 2000 to MS SQL Server 2000? My application is using MS Access 2000 as database and as user interface such as forms. Now, I want to migrate the backend database from MS Access 2000 to MS SQL Server 2000. However, I want to keep the MS Access 2000 interface. Would it be possible? If I migrate the MS Access to SQL Server, would the queries, back-end VBA, macro, tables and forms be affected? Do I need to change the MS Access data type to SQL server supported data type? Which tool I can use to do the migration? Upsizing wizard or exporting...

Web resources about - HELP!Unable to run macros in ms access database FROM VB - comp.databases.ms-access

Help - Wikipedia, the free encyclopedia
United States Senate Committee on Health, Education, Labor and Pensions , commonly abbreviated "H.E.L.P." Text is available under the Creative ...

Help:Contents - Wikipedia, the free encyclopedia
Templates are special pages that contain boilerplate text intended to be displayed on more than one page in Wikipedia. This Tip of the day box ...

Mental health map could help ‘lost’ patients
A NEW project to map out mental health services throughout WA is expected to help a “dysfunctional system” and prevent patients getting lost ...

Mental health services map project could help ‘lost’ patients - PerthNow Search Search
A NEW project to map out mental health services throughout WA is expected to help a “dysfunctional system” and prevent patients getting lost ...

Two new District Court judges to help ease trial backlog
A $20 million package of funding, including the appointment of two new judges, will&nbsp;deliver a total 256 sitting weeks for the District Court ...

Do You Want To Help Put A NeoCon Administration Back Running The White House?
... a woman whose turn it is and aside from spurious and absurdist claims worthy of a House of Cards episode that she's dedicated her life to helping ...

A startup that helps police track criminals using bitcoin just raised $5 million
A startup that helps law enforcement agencies in the US and UK catch criminals that are using bitcoin has raised $5 million (£3.5 million) from ...

These inmates help train stray dogs - Business Insider
The dogs end up helping the inmates, too.

Westbrook, Durant help Thunder withstand George's 45 points
INDIANAPOLIS (AP) — Russell Westbrook had his second triple-double in two nights, Kevin Durant had 33 points and 13 rebounds, and the Oklahoma ...


Resources last updated: 3/21/2016 3:31:52 PM