Hello everyone!
I have a new assignment. I just dont know how to create a data report using ms excell.
I need to search particular group of data/records using Visual basic 6. in MS Access and transfered this selected data in MS Excel. to generate a report.
Please can anyone give me a tip or I'd rather say the syntax on how to edit,delete,add,search data in ms access using visual basic 6 without using Adodc component. (you see im having problem in using adodc component and directly connecting the textbox on adodc's data field the computer prompt me operation cancelled).
And proper way of transferring records/data from MS Access using VB to MS Excel.
thans Folks ;)
11 5807
Greetings, DUNXALEARE!
I am sure it's probable and perhaps there are many ways to start.
(1) How much time are you willing to invest taking on this project?
(2) Do you have anything working at this point?
Please excuse my passiveness. It'd be helpful to you if we know what you have thus far.
You may need to get one thing working then tackle the next (i.e. VB to Access first, then Excel). It's also likely, a great tutorial will be of use if you're interested and have the time to look through.
Welcome!
Dököll
Greetings, DUNXALEARE!
I am sure it's probable and perhaps there are many ways to start.
(1) How much time are you willing to invest taking on this project?
(2) Do you have anything working at this point?
Please excuse my passiveness. It'd be helpful to you if we know what you have thus far.
You may need to get one thing working then tackle the next (i.e. VB to Access first, then Excel). It's also likely, a great tutorial will be of use if you're interested and have the time to look through.
Welcome!
Dököll
As of now i try to connect and manipulate the data in ms access using vb 6. but i encountered some problems like run time error because i used directly an adodc components ( the only way i know to transfer or retrieve data in access) . I guess i need to focus on connecting visual basic to ms access using other method other than adodc components, before i proceed to ms excel, is that possible?
Im just a begginner so i know only basic ,but I will be glad if I'll learn advance or new programming techniques from you guys.
Kind regards :)
-
-
saves_click()
-
Select Case act
-
Case 2
-
Select Case cond
-
Case 0
-
ansr = MsgBox("The employee you enter already exist. Would you like the record to display?", vbYesNo, Label)
-
If ansr = vbYes Then
-
act = 0
-
ans = txt_no(0).Text
-
epis.Recordset.CancelUpdate
-
educ.Recordset.CancelUpdate
-
family.Recordset.CancelUpdate
-
flag = False
-
saves.Enabled = flag
-
initialization
-
search
-
Else
-
epis.Recordset.CancelUpdate
-
educ.Recordset.CancelUpdate
-
family.Recordset.CancelUpdate
-
Exit Sub
-
End If
-
Case 1
-
ans = MsgBox("Are you sure you want to save this record?", vbYesNo, Label)
-
If ans = vbYes Then
-
educ.Recordset.MoveFirst
-
family.Recordset.MoveFirst
-
epis.Recordset.MoveFirst
-
MsgBox "You succesfully save the data", vbOKOnly, Label
-
txt_no(0).Visible = True
-
Else
-
GoTo 4
-
End If
-
Case Else
-
'act = 2 and cond <> 0 or 1
-
End Select
-
Case 3
-
If cond = 1 Then
-
MsgBox "The record's identification code has been modified. System failed to update.", vbCritical, Label
-
epis.Recordset.CancelUpdate
-
educ.Recordset.CancelUpdate
-
family.Recordset.CancelUpdate:
-
epis.Recordset.MoveFirst
-
educ.Recordset.MoveFirst
-
family.Recordset.MoveFirst
-
Else
-
'act = 3 and cond <> 1
-
End If
-
Case Else
-
'act <> 2 or 3
-
End Select
-
-
act = Empty
-
acts = Empty
-
Form_Load
-
-
4:
-
End Sub
-
That is one part of my coding and it focus on saving. it runs smoothly 10 to 20 times, until i encounter a runtime error "operation cancelled"
As of now i try to connect and manipulate the data in ms access using vb 6. but i encountered some problems like run time error because i used directly an adodc components ( the only way i know to transfer or retrieve data in access) . I guess i need to focus on connecting visual basic to ms access using other method other than adodc components, before i proceed to ms excel, is that possible?
Im just a begginner so i know only basic ,but I will be glad if I'll learn advance or new programming techniques from you guys.
Kind regards :)
All is probable and the possibility relies on your patience. You will get it. You can achieve as you please D...
Perhaps adodc is what you should tackle first, with minimal coding.
Try searching this forum using "DataReport Adodc1". You'll find a number of posts on this. Continue with Excel afterwards. How's that for a deal?
-
-
saves_click()
-
Select Case act
-
Case 2
-
Select Case cond
-
Case 0
-
ansr = MsgBox("The employee you enter already exist. Would you like the record to display?", vbYesNo, Label)
-
If ansr = vbYes Then
-
act = 0
-
ans = txt_no(0).Text
-
epis.Recordset.CancelUpdate
-
educ.Recordset.CancelUpdate
-
family.Recordset.CancelUpdate
-
flag = False
-
saves.Enabled = flag
-
initialization
-
search
-
Else
-
epis.Recordset.CancelUpdate
-
educ.Recordset.CancelUpdate
-
family.Recordset.CancelUpdate
-
Exit Sub
-
End If
-
Case 1
-
ans = MsgBox("Are you sure you want to save this record?", vbYesNo, Label)
-
If ans = vbYes Then
-
educ.Recordset.MoveFirst
-
family.Recordset.MoveFirst
-
epis.Recordset.MoveFirst
-
MsgBox "You succesfully save the data", vbOKOnly, Label
-
txt_no(0).Visible = True
-
Else
-
GoTo 4
-
End If
-
Case Else
-
'act = 2 and cond <> 0 or 1
-
End Select
-
Case 3
-
If cond = 1 Then
-
MsgBox "The record's identification code has been modified. System failed to update.", vbCritical, Label
-
epis.Recordset.CancelUpdate
-
educ.Recordset.CancelUpdate
-
family.Recordset.CancelUpdate:
-
epis.Recordset.MoveFirst
-
educ.Recordset.MoveFirst
-
family.Recordset.MoveFirst
-
Else
-
'act = 3 and cond <> 1
-
End If
-
Case Else
-
'act <> 2 or 3
-
End Select
-
-
act = Empty
-
acts = Empty
-
Form_Load
-
-
4:
-
End Sub
-
That is one part of my coding and it focus on saving. it runs smoothly 10 to 20 times, until i encounter a runtime error "operation cancelled"
Nice code, keep it handy for later usage. Get VB to Access working first. See one of my posts on DataReport? Please search, you'll save yourself some effort...
Nice code, keep it handy for later usage. Get VB to Access working first. See one of my posts on DataReport? Please search, you'll save yourself some effort...
THANKS FOLKS :)
I'll definitely look for that report
All is probable and the possibility relies on your patience. You will get it. You can achieve as you please D...
Perhaps adodc is what you should tackle first, with minimal coding.
Try searching this forum using "DataReport Adodc1". You'll find a number of posts on this. Continue with Excel afterwards. How's that for a deal?
heyo i've searched your post about connectiong visual basic to ms access.
your forum with "Yoda". I guess you still remember him.
the splash and login is working but in "about" I'm Stucked.
i folow your coding there and i've got the same error Yoda was saying
" Compile Error -Undefined User-Defined Type not Defined"
I follow the whole discussion between you and yoda about it.
did you found solution about that error.
kind regards
DUNXALEARE :)
heyo i've searched your post about connectiong visual basic to ms access.
your forum with "Yoda". I guess you still remember him.
the splash and login is working but in "about" I'm Stucked.
i folow your coding there and i've got the same error Yoda was saying
" Compile Error -Undefined User-Defined Type not Defined"
I follow the whole discussion between you and yoda about it.
did you found solution about that error.
kind regards
DUNXALEARE :)
A solution was indeed, found, and Yes Yoda's a good man. A gentle person of our group searched and found a solution to the error and posted a link for the Scripts Forum. Incidentally, the code works on my machine, deals with the access version, it seems...
Please look at last few posts, 11th, or 12th position of that discussion. Let me kow how it turns out :-)
Still, I think you need DataReport, as Yoda's had to do with communicating with Access...
I'll fetch for Adodc1 DataReport, and will push it forward for all to see, remember to keep an eye on Adodc1 D, ok...
I'll fetch for Adodc1 DataReport, and will push it forward for all to see, remember to keep an eye on Adodc1 D, ok...
sure hope to see it very soon. :)
sure hope to see it very soon. :)
Good, hopefully user-friendly:-)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Andi Plotsky |
last post by:
I am not a .NET developer. I want the Developer's Edition of Visual Studio
for use with my Access2000 databases. Does anyone have a clue as to where
to find it - my office manager says only .NET...
|
by: Volumstein |
last post by:
Hello,
I am spoiled coming from programming in word and excel which
offer the "record macro" tool that eliminated most basic syntax
confusions that I had. unfortunately msaccess doesn't offer...
|
by: Omar |
last post by:
Hi Developers,
I am trying to access an Excel data file through a VB.Net application.
I have the following code:
=================================== VB.Net Code ===================
Dim...
|
by: super_dave_42 |
last post by:
I am searching for a way to create multiple records in Access 2000 from
a worksheet created in Excel. I'm pretty much self-taught with Visual
Basic so forgive me if this poorly described. Basically...
|
by: Steve |
last post by:
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains
custom functions. I believe I need to use COM interop to allow VBA code in
Excel 2002 to access it. I've studied...
|
by: JimmyKoolPantz |
last post by:
I have been given the task of converting a program from VFP (visual
foxpro) to Visual Basic.net. My question is "Is it possible to
generate a DBF file Dynamically(at runtime) using Visual...
|
by: marknoten |
last post by:
I'm quite a newbie to Visual Basic and have a problem with the Input # statement in the Visual Basic Editor from Excel. I would like to read in a tab delimeted text file selected by a user with...
|
by: chrspta |
last post by:
I am new to Visual basic. I need a program using VB6 that converts txt files to excel file.Description is in the below:
The form should have the Drive list, Dir list, file list and cmdConvert...
|
by: =?Utf-8?B?UGV0ZXIgSw==?= |
last post by:
I am working with Visual Studio or alternately with Expression Web. I need
to create about 50 aspx pages with about 1200 thumbnali images, typically
arranged in three to four groups per page,...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |