Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




About Microsoft Access And Visual Basic


i have a project which requires me to enter some data in visual basic and save into microsoft access.the saving part has no problem but whenever i close my .exe , the error below will appear. i dont really know how to do microsoft access as it is passed down to me from someone else . so can you all help me zoom in where might the error be so i can look up in books.

the .exe doest has any problem when i just open and exit , but if i add any data to it , it will has an error msg however the data will still be saved.

final is my project's name

Final has encountered a problem and needs to close. We are sorry for the inconvenience.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Visual Basic 6 0 And Microsoft Access
I have a VB program that uses Microsoft Access. However, I would like to use code so that if a user selects a particular date range (i.e., 2005-2006 rather than 2006-2007) the code will direct that user to a particular table. Perhaps this is something within MS Access but I am learning to use both Access and VB at the same time. Any assistance would be appreciated. Thank you.

Microsoft Access To Visual Basic
I currently manage several databases in Microsoft Access and wish to migrate these to Visual Basic stand-alone applications. I wish to do this because there are currently compatibility problems between versions of Microsoft Access that we do not require to have in the future.

I would prefer to develop an application in Visual Basic that uses the data in Access tables as its data source but is stand-alone in that it can be installed on any computer (running Windows) whether or not the client has Microsoft Office and no matter which version of Office they have.

My question is, does anyone know of any problems with this approach and is it feasible to do what I propose? I have written small VB apps that use Access tables before and they worked fine, however I have never been able to get it to reproduce reports like the ones in Microsoft Access. I have heard that Crystal reports can do this but I have no experience of it.

Any advice would be appreciated.

Have fun!

Alex Middleton

Trying To Use Visual Basic 6 To Open A Microsoft Access .mdb
I have no idea where to start, I just need a general idea if this is
possible:

Originally I created a vb app that uses the WebBrowser component to
view excel files, which seemed to work fine, but does not give me the
control over the user scrolling around the spreadsheet once it was
loaded.

I then tried using the OLE object to open an embedded excel form and
that looks terribly ugly when you try to edit any of the fields.

So now I'm on to trying to open an access application within my vb
application. Is this even possible? and if so what component do I
need to import inorder to open the *.mdb file? I've searched and
searched but to no avail it looks like no one has tried doing this
(perhaps there are better ways).

Please help, I'm running out of time... Thanks in advance,

Perry

Trying To Use Visual Basic 6 To Open A Microsoft Access .mdb
i wish to open the access file.
they said this will do but not for me

Shell "C:Program FilesMicrosoft OfficeOffice10EXCEL.EXE" "C:My DocumentsQuery.mdb"
help pls




Edited by - wtkm on 10/11/2007 2:19:29 AM

Microsoft Access Autonumber In Visual Basic
hi!,

i am creating a software. I am using "Microsoft Access". I have created a database and have set the data type to "Autonumber". What I want to do is the following:

When the software runs inside the text box I want the software to display a number. This number is that it adds on one each time.

How do u do this? Can u send me sample code. If u send me sample code can u plz explain what the code means.

Anyways plz let me know as soon as possible.

Thank you for ur help in this matter.

My Visual Basic 6.0 Only Supports Microsoft Access 97 Formats
I been using the data form wizard and I have Office xp But visual basic 6.0 will not support microsoft access 2000 and 2002 format how can I make visual basic to work with those formats do i need to upgrade or some service packs or what

thank you

Microsoft Access Linked To Visual Basic Professional
As relatively new to Visual Basic programming, I have had no success in being able to read and update Microsoft Access tables once designed. More specifically if I create the table and link it to my application as a database, Access asks me to update to a later version. If I don't, I can't modify the tables or forms. If I do, then when I run the program Visual Basic notifies me that it is an unrecognized database and I can't use it. Does anyone know what I should do?
Thanks
idocwess1

How To Use Visual Basic To Show One Table Of Microsoft Access
I am new in VB and Access. I do not know how to use VB to show one table of Microsoft Access. I mean that just click one button, then one table appear immediately.

Problem Using Microsoft Access (.mdb) File In Visual Basic
I'm trying to use microsoft access file .mdb (in window 2000) file in visual basic6 but everytime "unrecognized database format" appear. The sample file-NWIND provided by vb can be used instead of my .mdb file. I don't really understand about system's ADO or DAO and how to check them. Can we change the setting in the References? How can I use my own .mdb file in vb?

Using Non American Date Formats With Microsoft Access And Visual Basic
Date problem.

Using non American date formats with Microsoft Access and Visual Basic.

I set my regional settings to English(Ireland) or English(United Kingdom)
and my date appears in Access as DD/MM/YYYY.
However if the day is less than 12 the day then becomes the month
e.g. 3 July 2003 is displayed in Visual Basic as 7 March 2003.
So if I have two records with different dates as such 6/8/03 and 15/8/03
the first date is 8 June 2003 and the second is 15 August 2003.
If I reset the Regional settings on the PC back to English(United States)
the problem goes away as long as I'm happy with MM/DD/YYYY format, but of
course I can't insist on an end users PC's regional settings being changed
in order for my application to run properly.

I've tried combinations of formatting the date in Access and formatting the
value returned in Visual Basic but I don't feel I'm winning the battle.
I could format the date and save it as a string and vice versa but I'm
hoping that isn't the only solution. I'm sure people have encountered this
a million times already. Any help on how you would approach this problem
would be greatly appreciated.

Kind regards,
Ray Brennan.
Dublin, Ireland.

Microsoft Access / Visual Basic 6.0 Two Tables/combo Box Problems HELP PLEASE!
--SORRY-- POSTED IN WRONG SECTION--

I am currently working on a project for a reading recovery program and I have run into some difficulties. A combo box pulls information from one table in the database to list students that are currently in the database. Another screen enables users to add, edit, delete, etc. However, I need to use the data that is populated in the combo box to pull information that is in the second table in the same database to populate the test data in the form for updating.

1. I can populate the combo box with the information from the first table. (I can list the students in the databases. NO problem here)
2. How can I use the selection of the combo box to populate the form with the data from the second table in the same database? (How can I pull up the test data of the student selected from combo box?)

Programs:
Microsoft Access 2002
Visual Studios 6.0 Pro

Any help would be greatly appreciated Thanks






Edited by - UAMTKE on 11/21/2004 11:07:44 PM

Visual Basic Through Microsoft Access How To Create A Stand Alone File
Hi All,

It's pretty much self explanatory... I have written a nice little program in visual basic through Microsoft Access and now I need to send that program out for testing... how do I create an .exe file/standalone file

-Devo

Microsoft Access User Login Form Visual Basic Troubles
Hello All-

This site has been a wonderful guide for me as I've taken on the task of teaching myself VBA and VB.

Currently I am having a problem with some VBA code in Microsoft Access.

I'm trying to make a user login form that will reference a table (tblAgentInfo) to allow access to the database. This table contains the folling infomation:

chrAgentID (primary key)
chrLastName
chrFirstName
hlkAgentEmail
chrAgentRank
strUsername
strPassword

The form contains one unbound drop-down list. It is sources its information using SQL: SELECT tblAgentInfo.chrAgentID, tblAgentInfo.strUserName FROM tblAgentInfo;.

It also has some code for After_Update():

Private Sub cboUserName_AfterUpdate()
'After selecting user name set focus to password field
Me.strPassword.SetFocus

Exit Sub
End Sub

The form also contains an unbound text box. It has an input mask so it displays as ******.

Finally, there is a cmd button labeled Logon.

The code I have for the cmd_Logon_DblClick() is as follows:

Private Sub cmdLogin_Click()

'Check to see if data is entered into the UserName box

If IsNull(Me.cboUserName) Or Me.cboUserName = "" Then
MsgBox "You must enter a User Name.", vbOKOnly, "Required Data"
Me.cboUserName.SetFocus
Exit Sub
End If

'Check to see if data is entered into the password box

If IsNull(Me.strPassword) Or Me.strPassword = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
Me.strPassword.SetFocus
Exit Sub
End If

'Check value of password in tblAgentInfo to see if this
'matches value chosen in combo box

If Me.strPassword.Value = DLookup("strpassword", "tblagentinfo", "[lngAgentID]=" & Me.cboUserName.Value) Then
lngMyAgentID = Me.cboUserName.Value

'Close logon form and open splash screen

DoCmd.Close acForm, "frmdatabaselogon", acSaveNo
DoCmd.OpenForm "frmsplash"

Else
MsgBox "Password Invalid. Please try again.", vbOKOnly, "Invalid Entry!"
Me.strPassword.SetFocus
End If

'If User enters incorrect password 3 times database will shut down

intlogonattempts = intlogonattempts + 1
If intlogonattempts > 3 Then
MsgBox "You do not have access to this database. Please contact Admin.", vbCritical, "Restricted Access"
Application.Quit
End If

End Sub

There is also a public module storing this information:

Public lngMyAgentID as Long

I get as far as the reference to check the password. If I don't enter a username the msgbox works fine. Same is true if I don't enter a password.

If you choose a user name and enter an incorrect or correct password I get the following error: " Run Time Error '2001' : You canceled the previous operation. " If I click debug, the following line is highlighted when the code window opens:

If Me.strPassword.Value = DLookup("strpassword", "tblagentinfo", "[lngAgentID]=" & Me.cboUserName.Value) Then

I'm stumped. I'm a complete new user here and I've been able to fumble my way pretty well so far. I got this code from a website and it have fantastic reviews.

Any suggestions or help would be SO appreciated.

Thanks!

Microsoft Excel And Microsoft Visual Basic
Hello,
I am currently attempting to constructed a program that interacts with an Excel file. In this excel file is just basiccly a spreadsheet on my savings. I want to make a program that interacts with this file by adding values to it and calcualting them

Heres a prototype .exe

Microsoft Visual Studio 6/Visual Basic 6 Sp6 RELEASED!!!!
Microsoft released Service Pack 6 for Visual Studio 6, download the latest(and final) service pack if you have VS6/VB6 installed.

Official Page
Official Page of sp6

List of Fixes
See the fixes from sp4 and sp5

Direct Download
Click here to download it (About 62mb)



Download it, it has many fixes included!



As BrianS told me: VB6 SP6, its only 26mb and VB Runtimes sp6 its only 1.02mb


Enjoy the new service pack! It is the LAST!!!!!

Microsoft Visual Basic 6.0
I'm thinking about selling my Visual Basic 6.0 Professional Edition, only because I want to buy Visual Studio (or Basic) 6.0 Enterprise Edition. Now, it would be pointless to keep both, but if I were to sell it, would someone be interested in buying it? I don't want to sell it under $60, but anywhere above is fine. This is not a definite, but incase I do...would you buy it and how much would you pay for it?

Is This A BUG In Microsoft Visual Basic 6.0, If Not, Help!!
My form1 has no border around it, and when
I make a Popup menu with the Menu editor,
vb 6 puts border around my form
eventhough I turn border off,
 I even set the borderstyle = 0 on form load that didnt work...
so whats goin on??



Edited by - N##B on 5/15/2004 4:08:30 PM

Microsoft Visual Basic
We have a Microsoft Access application that is used by a small group of users.

A few of the users have experienced a recurring error message:

Run-time erro '3167'

Record is deleted.

Note: The error does not occur routinely, does not occur for all users and there aren't any records deleted from the database.

Visual Basic In Microsoft Word.
Hi I just started prgramming and I have visual basic 6, the kind that is in the microsoft word toolbar list. I have several problems. First of all I cant click on the toolbox without it going back into word. Second I cant access the new project window. last of all I cant get all of the form layout window to appear. Please help me as soon as possible! Thanks!

Visual Basic And Microsoft Project
Anyone using Microsoft Project objects for VB applications? I have been using Groupwise Novel objects and Outlook objects but never using MS Project.
Let says, The manager assigned oout many projects and save them to one of the network drive. The VBA I am going to create will get what he saved in the network drive and display in my program.
Any idea?
Thanks

Visual Basic And Microsoft Global IME
I have been programming in VB for a while now and consider myself fairly good. However i'm having a problem now i don't know how to go about solving. I am trying to make visual basic work with mgIME. I want to be able to input the Japanese characters into a text box in visual basic. I would also like to be able to save to a file. I have no idea to go about doing this becuase i've been unable to find any documentation about programming with the IME. If anyone has any suggestions, pointers, or links i would be very greatful.

Microsoft Reader And Visual Basic
Ive recently discovered that you can use certain features of 'Microsoft Reader' and the Text-To-Speech package in visual basic, however I cant find any tutorial style information, or any assistance anywhere on how to use this to its full potential.

Any assistance, or links to relevant tutorials would be greatly appeciated

Microsoft Visual Basic Express
Okay,

Just wondering what the disadvantages are of Visual Basic Express as opposed to the normal VB6? Is it even the same thing? Or is it two completely different programs? Normally I wouldn't be suspicious, but Microsoft are offering it free on thier website... so is it pretty much the same as owning a copy of vb6?

Zeka

Visual Basic And Microsoft Project
I was wondering if anyone had done any development with Visual Basic for Microsoft Project. My boss wants me to code him up an app to automate some reporting tasks and the help provided for the Project objects is pitiful. Any ideas or links?

Microsoft Visual Basic 4 Problem
Ok i hve got vb4, when i save a project then reopen it and double click the form i wish to edit an illegal operation appears, are threr any updates for this?

Microsoft Speech Sdk With Visual Basic
Hi all,

I have a problem with Visual basic using Microsoft speech sdk.

Microsoft speech sdk5.1 comes up with a visual basic prorgram called SimpleDict which serves as Speech recognition program. When I run this program and start speaking into the microphone it is taking all wrong words, and When I checked in the code for grammar loading file there is no file (grammar) mentioned in it.
Can you please help how to make it to capture correct words.

Thanks for your help
kiran

Microsoft Word OLE Visual Basic 6
I am trying to do something that seems very simple in nature, yet overpowering via code!  =)  Your help is very much appreciated!

1.) I need Visual Basic to open an existing Microsoft Word document.  I have no problems with this part.  ;)
2.) I then need Visual Basic to go through the entire loaded document to replace text.  If I have an occurence of <<customer>> I'd like to replace that with a customer name via Visual Basic code.  As of the moment I'm using the words.item object, but it's really slow.  I really need to find out how to use the replace command but have no clue.  I am asking for any help you may offer...  Thanks a lot!

Visual Basic And Microsoft Word
HI guys!

I have a VB application and I have a function there, for working with Microsoft Word.

this is the begin the code:

  Set WordTemplate = CreateObject("WORD.APPLICATION")
  Set WordReport = GetObject(app.Path + "NewDoc.doc")

  With WordReport.Application
    
    .Visible = True
    .Selection.Find.ClearFormatting
    .Selection.Find.Text = "Construction"
    .Selection.Find.Replacement.Text = "-----------------"
    .Selection.Find.Forward = True
    .Selection.Find.Execute

   ........

My problem is, if the user already has a word document openend or, while I'm working in VB with the Word document and the user goes to other editor, the program crashed and say me the error:

**Object variable or with block variable not set**

this error can occurs in any part of the code where I'm using the wordreport object, for example

WordReport.Application.Selection.MoveLeft Unit:=wdCharacter, Count:=1

I was thinking if I need to close all word applications before I start with this, but, I saw, also, if you don't have any Word document opened, this error occurs

any idea??

thanks

Using Microsoft Graph From Visual Basic
Hi Everybody,

         I want to know is
                 How can we put Tooltips in the Microsoft Graph Chart Object from visual basic?
      I am using the MSGraph.Chart Object in Ole viewer to display the Data in Bar Chart Format.
      Now, I want to display some tooltip for each Bar in the Bar Chart (or PIE in PIE CHART).



Nitin.

Microsoft Word And Visual Basic
I tried to create an OLE control and load a Word document. the problem is that when the form containing the ole control appears, the document is loaded but when i try to modify it, the File menu from Word doesn't appear. is there any way to execute a normal Word Application inside a form using an OLE control or without using it??

One more thing: i try to draw the ole control as wide as the screen but when i modify the wocument, it changes size. Why is that?

Uriel (From Argentina)

Run VB Application On PC With No Microsoft Visual Basic Installed
Hi,

Is it possible to deploy a VB application onto a PC with no Microsoft Visual Basic and run it successfully?

Thank you.

Visual Basic And Microsoft Excel Problem
Hi ,
I'm making a visual basic package with wise installer.
My program opens excel templates from visual basic 6.0
When installed to client and trying openning excel files from program an error shows saying tha the dll was not found (error loading dll).

I'm using visual basic 6 sp 6.
It works fine with vb6 installed, but with package not.
Here is the code

Set ApExcel = New Excel.Application
ApExcel.Visible = True
ApExcel.Workbooks.add (App.Path & "Excel Templatefile 1.xls")

Does anyone know how to deal with deployement of excel in visula basic packages?

Microsoft Word Visual Basic Applications
I am working with the CommandBars("Standard") function in VBA for Word. I am wondering how I can load up the number of buttons into an array. It must be something like this...
ArrayButtons = Array(CommandBars("Standard").Controls)

Or something like that.
Any help would be awesome.

Thanks muchos,
Chris

Microsoft Visual Basic 6.0 Professional Edition
I am looking to buy a new,stand-alone version of Microsoft Visual Basic 6.0Professional Edition ( not an academic version). How many different package or version out there? I also want the MSDN that comes with the package.

Visual Basic && Microsoft Excel Integration.
A program i recently wrote involes a user entering various peices of information resulting in a form with a summary of all information they've entered. I want this form to be printable incase the user wishes to store the information on paper form aswell as in a database (already catered for), i have the print command button and i was simply thinking of adding the code PrintForm but thought to myself it wouldn't print to a professional standard. I designed a table in Microsoft Excel to hold the information displayed on the summary form at the end of my table, now i'm wondering what type of code i'd be looking at so that when the user clicked print on the summary form Microsoft Excel loaded the table i designed and it was filled with the information displayed on the summary form and then printed, after printing it would be nice if Microsoft Excel exited or the window became inactive and the summary form became active again but that's just an addition to the main task at hand.

If anyone could point me in the right direction or infact even be kind enough to give me an example peice of code on how i'd go about achieving this then it'd be greatly appreciated, alternatively to replying you could email me. Thanks for reading my post.

- Leon

Was Microsoft Money Made With Visual Basic????
OK i have a question:

does anyone know the name of the technology or controls that they used to build the microsoft money user interface???

is it interdev??? is it html???

is it just picture boxes with labels???

i really would like my programs to look like money, flat coltrols and all that stuff...

thanks!

Writing To Microsoft Word From Visual Basic?
I know its a simple question but I could not find out the solution
How can I write to MS Word using Visual Basic?

Header In Microsoft Word Through Visual Basic
I have to make some reports in Word through Visual Basic.
If the file has more than 2 pages, I have to change the header of the second page.
Can someone give me the source code to write the word "test" in the header of the second page.

I found this on the net but it doesn't work:

intNbPages = wrdapp.Selection.Information(wdNumberOfPagesInDocument)
    If intNbPages > 1 Then
        Set objRange1 = ActiveDocument.Sections(3).Headers(wdHeaderFooterPrimary).Range
        With objRange1
            .Delete
            .InsertDateTime "dddd, d MMMM, yyyy", False
            .InsertAfter Titre + Chr(13)
            .Collapse Direction:=wdCollapseStart
        End With
    End If

I'm not sure how to use the "sections".
How does it work ?

thx
Djou

I Have Microsoft Excel 97 And A Visual Basic Project
My visual basic project is to atomatically go from one question to another wherein some of the cells in the Microsoft Excel cells have an equation to solve befor the next question or equation. The equation of interest calculates .940 through .979.
The table is composed of columns labeled .940 through .979. The columns are really two columns for .940, two for .941...until .979. The first column has degrees Fahrenheit from -15.0 to +104.0 by tenths of a degree. The second column has a number for cubic feet per minute, a differnt number for each Fahrenheit reading. What I need to do is get the program to see--ah, ha .942--go to .942 column, read down the Fahrenheit column to say 52.2 degrees Fahrenheit or whatever the digital thermometer says and go over to its corresponding CFM number, remember that number and put that number into the next equation in the other section of the spreadsheet that lists questions/equations to the last equation which calculates the % diference between the standard 40 CFM and the reading from this Look-Up Table.
I could do this in the old GW Basic, but what ever happen to Go to, If Then, For Next statements to do in Microsoft Excel 97?

email: frigate602002@yahoo.com

An Introduction To Programming Using Microsoft Visual Basic 2005
Hi there, I'm a computer engineering teacher for a grade 10 class in a school in Ontario, Canada. I am currently using the book called "An Introduction to Programming Using Microsoft Visual Basic 2005" (Author: Beth Brown) to teach my class with. Grade 10 course for computer engineering is for beginners and people who are still new to VB or have limited knowledge of VB.

My question and request is if anyone has the answers or codes(or know a source to) the excercise questions in the book. I need this for my class and for myself in the future for classes in following semesters.

If anyone knows this book, I'd appreciate the help.

---!#~Microsoft Excel With Visual Basic 6.0 [point Me To A Tutorial PLS!]~#!---
Hi....

Im learnin VB 6.0... Im searching for a tutorial on using Excel with VB!..

i want to learn how to create Excel, workbooks,sheets, .. add data to it... extract data... from it..

pls point me to some good tutorial ASAP!

thx

Creating And Compiling Visual Basic Without Microsoft's Program
Hi all,

I'm now starting to learn Visual Basic in a course, and I must admit it's pretty cool.
But, I do get some home assignments, and I have no way to accomplish them because I don't have Microsoft Studio or whatever it's called at home, and I'm obviously not gonna buy it because it's very expensive and who knows I might quit the course tomorrow.

Anyhow, is it possible to create and run visual basic programs without that studio? That would really be great so I can practice at home.

Thanks!

Need Help In Microsoft Visual Basic 2005 Express Beta 2!
i am making a program and i am wondering how to make the scrollbar scroll down in a program. i also want to know how you get data to save in a program when a user of the program types it in, after it stops running.(so that when you open it againg, it is still there.)

please help

Printing Code From The Microsoft Visual Basic Screen

I'd like to print out a module.  Is there a way to Print Code from the Microsoft Visual Basic screen to a color printer, and maintain the color settings?  

(its okay - I don't have high expectations.)


Determining Microsoft Word Version Using Visual Basic
I am trying to write a filter script and I would like the script to know if it is running on MS word 97,98 or 2000. How could I do this. ie. How could I write the code to determine or check what verison of MS word I am using. Thanks

Running VB Application On A PC With No Microsoft Visual Basic Installed
Hi,

I have a VB application which I want to distribute to clients with no Visual Basic installed in their PCs. I understand that is possible but I don't know how.
Could you tell me how to do this please? I tried using Package and Deployment. The application was able to run successfully in PCs with Visual Basic but issues an error with those PCs with no Visual Basic.
Please help.

Thank you.

Opinions On Microsoft Visual Basic Game Programming With DirectX?
I'm getting a book on how to program games in VB well. I've heard some good things about this book (Microsoft Visual Basic Game Programming With DirectX) and was wondering what people thought about it, if you have used it, if you've heard of anything better. Books are pretty expensive, so I want to get a really quality one. Also, does anyone know if this covers good practices for structuring games as well? A.K.A. is it very complete, or does it mostly just discuss Direct X?

Thanks

Change The Data In Microsoft Word To Flexgrid In Visual Basic
Hi all,

I have a problem, the data in the table and this table in the microsoft word. Change this data to flexgrid in the visual basic. Please!

Thank!

Answering Microsoft Generated Dialog Boxes In Visual Basic Code
Hi,

If any one can shed some light on this it would be greatly appreciated.

I have written a program that allows the user to enter some information and from this the program calculates more data and exports it into an excel spreadsheet. The program works fine, however, it has one facet that I am not sure how to deal with:

The code saves the newly created spreadsheet to a location defined by the user. Occasionally, a file already exists in the location the user has selected. Microsoft Excel therefore generates the usual dialog box that asks the user if he wants to replace the existing file with the new one. Is there any way I can stop this dialog box from appearing making the program automatically replace the existing file with the new one? Or is there a way I can make 'Yes' the default answer without the user having to select anything?

Thanks in advance for any help you can give!

Copyright © 2005-08 www.BigResource.com, All rights reserved