VBA, Access, And Accessing Elements...
hi, I am writing a database using ms access and have a bunch of data on a form with a button I defiend. now, when you click the button, I want to check the value of a text box that is on the form (txtid). however, every tiem I try to check use or display the value I get "you can not access a property of method for a control unless the control has the focus." how do I get around this? its weird... I can change its visiblility, but can't modify the data?!? what am I doing wrong?
Code: MsgBox (Me![txtID].Text)
if you can help me out... it woudl be greatly appreciated... thanks!
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Accessing String Elements
I am wanting to access the individual elements in a string, but haven't quite figured it out.
For example, I have a string named sMyString that contains "Hello, world!". I would like to change the '!' to a '?'. I thought I could do this: sMyString[13] = "?" but it doesn't work.
Could someone show me the correct method, please.
tia
clu
Beginner : Accessing Elements Of An Asp Page
Hi,
I need to access elements of an exiting IE instance. With .php or .html page I just write simple Vb code (using HTMLdocument object, and Tagname properties) ans it works fine.
With .aspx page i found that the Htmldocument only contains information on asp frames, and i can't access to the objects or elements in each frame.
How to get access to elements in a asp page?
Accessing Specific Type Elements By Parameter
Hello all!
I've tried to accesss an element of my-defined types passing a string by parameter of function, which value is the name of the element I wanna return.
I was creating a enum wich each element was linked with the order of the equivalent type element, but when there are lots of my-defined types, it's tiring to create lots of functions to return type elements by enums.
Well, some one know a easier way to do this?
Thanks.
Access Form Elements In Web Page!
I am using the Microsoft Internet Controls (WebBrowser control) in a VB6 application. When I navigate to a web page, the page will be displayed in the WebBrowser control. Suppose I visit www.google.com. This page will mostly have different Form elements like textboxes, checkboxes, drop-down lists etc. Now how do I access these Form elements as a programmer?
Actually I need to make the 'Edit' menu with Cut, Copy & Paste. Now since a user is on a web page, it's is pretty obvious that users shouldn't be allowed to 'Cut' any text on the web page (execept for the text they have typed in a textbox or a textarea) i.e. 'Cut' should be disabled in the menu & should be enabled only when the text in a textbox or a textarea is selected by the user so that he can cut the selected text & paste it somewhere. So how do I find out whether the text in a textbox or a textarea has been selected by the user or not?
Thanks,
Arpan
Using Variable Values To Access Struct Elements
Hello,
'Say I have a user defined type;
type days
Sun as single
Mon as single
Tues as signle
end type
'and I have a variable temp
Dim temp as string
'I assign temp
temp = "Sun"
'How do I use the value of temp to access elements of the data type?
'days.<value of the temp variable> = 1 so that it is the same as
days.Sun = 1
Thank you for the help,
Rob
Finding Common Elements (values) In Two Tables In MS Access Db Using VB 6.0
Hello!
I am new to VB 6.0. Currently I am doing some data pre-processing for a project, and not being good in VB I had difficulty in something.
Suppose I have two tables in MS access:
1) Jan2006
2) Feb2006
And these two tables have equal number columns. My focus is only to select a column named "CustomerNo" in both Tables in my MS access database (I converted from excel files using VB 6.0).
I am trying to find the common elements in both the CustomerNo columns in Jan2006 and Feb2006, using VB 6.0 (rs.find) currently, however I am unable to do so. After finding the common elements I wish to extract them into a new table and then go ahead with my other data files.
Exceptions:
(1) There are duplicate values in the CustomerNo column, which need to be skipped, when the common values are extracted
(2) I have 50,000+ rows of data, resulting in 600MB db file for pre-processing in this manner, needed a fast and optimizable way
(3) The number of rows are not same in any of the "CustomerNo" columns. However the data is numerical value like:
TABLE: JAn2006
CustomerNo
00200002
00200003
00200004
00200005
00200006
00200006
00200007
00200008
00200010
00200011
00200012
00200015
00200016
00200020
TABLE: Feb2006
CustomerNo
00200002
00200003
00200004
00200005
00200007
00200008
00200010
00200011
00200012
00200015
00200016
00200021
00200022
Here is the code I was working on, currently having a problem with the pointers using rs.find:
Code:
Dim cn As New ADODB.Connection
Dim cnstr As String
Dim sql As String
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim rs3 As New ADODB.Recordset
Dim strFilePath As String
Dim strloop As String
strFilePath = App.Path & "data.mdb"
cnstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFilePath & ";"
cn.Open cnstr
sql1 = "SELECT CustomerNo FROM Jan2006"
sql2 = "SELECT CustomerNo FROM Feb2006"
Set rs1 = cn.Execute(sql1)
Set rs2 = cn.Execute(sql2)
Do Until rs2.EOF
rs1.MoveFirst
strloop = rs1.Fields("CustomerNo").Value
MsgBox rs1.Fields("CustomerNo").Value
rs2.Find ("CustomerNo='strloop'"), , adSearchForward, 1
If (rs2.EOF = True) Then
Debug.Print rs1.Fields("CustomerNo")
End If
rs2.MoveNext
Loop
rs1.Close
rs2.Close
End Sub
Finding Common Elements (values) In Two Tables In MS Access Db Using VB 6.0
Hello!
I am new to VB 6.0. Currently I am doing some data pre-processing for a project, and not being good in VB I had difficulty in something.
Suppose I have two tables in MS access:
1) Jan2006
2) Feb2006
And these two tables have equal number columns. My focus is only to select a column named "CustomerNo" in both Tables in my MS access database (I converted from excel files using VB 6.0).
I am trying to find the common elements in both the CustomerNo columns in Jan2006 and Feb2006, using VB 6.0 (rs.find) currently, however I am unable to do so. After finding the common elements I wish to extract them into a new table and then go ahead with my other data files.
Exceptions:
(1) There are duplicate values in the CustomerNo column, which need to be skipped, when the common values are extracted
(2) I have 50,000+ rows of data, resulting in 600MB db file for pre-processing in this manner, needed a fast and optimizable way
(3) The number of rows are not same in any of the "CustomerNo" columns. However the data is numerical value like:
TABLE: JAn2006
CustomerNo
00200002
00200003
00200004
00200005
00200006
00200006
00200007
00200008
00200010
00200011
00200012
00200015
00200016
00200020
TABLE: Feb2006
CustomerNo
00200002
00200003
00200004
00200005
00200007
00200008
00200010
00200011
00200012
00200015
00200016
00200021
00200022
Here is the code I was working on, currently having a problem with the pointers using rs.find:
Code:
Dim cn As New ADODB.Connection
Dim cnstr As String
Dim sql As String
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim rs3 As New ADODB.Recordset
Dim strFilePath As String
Dim strloop As String
strFilePath = App.Path & "data.mdb"
cnstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFilePath & ";"
cn.Open cnstr
sql1 = "SELECT CustomerNo FROM Jan2006"
sql2 = "SELECT CustomerNo FROM Feb2006"
Set rs1 = cn.Execute(sql1)
Set rs2 = cn.Execute(sql2)
Do Until rs2.EOF
rs1.MoveFirst
strloop = rs1.Fields("CustomerNo").Value
MsgBox rs1.Fields("CustomerNo").Value
rs2.Find ("CustomerNo='strloop'"), , adSearchForward, 1
If (rs2.EOF = True) Then
Debug.Print rs1.Fields("CustomerNo")
End If
rs2.MoveNext
Loop
rs1.Close
rs2.Close
End Sub
Inserting Elements Into A Access Database One Element At A Time
Hello everyone, i am a pretty big noob when it comes to VB, but i have a lot of experiance with C, Java, and ASM.
For this project i am working on we need to dynamically generate a VB database, with a variable amount of fields, i believe i have found how to do this(if the following code won't work let me know(thanks )):
Set db = CreateDatabase("C:junk.mdb",dbLangGeneral)
Dim db As Database
Dim td As TableDef
Dim fl As Field
Set db = CreateDatabase("C:junk.mdb",dbLangGeneral)
Set td = db.CreateTableDef("Table1")
For iFlds = 1 to 5
Set fl = td.CreateField("Field" & CStr(iFlds), dbInteger)
td.Fields.Append fl
Next iFlds
db.TableDefs.Append td
However as the amount of fields will be dynamically generated i don't know how to either:
(A) insert one element at a time into the access DB (this is the ideal case)
or
(B) dynamically generate a insert statement. (would perfer to not have to do it this way)
Document Elements Access And Holding. Attribute Retrieval
Is there a way to have a variable to hold all the elements of all kind in a HTML Document?
I want to loop through all the elements, get info about the element (tag, src, href, alt , etc.)
Help me with an efficient way.
I try hDoc.getElementsByTagName(strEle) for each thing that I know of about tags but its not efficient and generic enough for all the different kinds of tags
Finding Common Elements (values) In Two Tables In MS Access Db Using VB 6.0
Hello!
I am new to VB 6.0. Currently I am doing some data pre-processing for a project, and not being good in VB I had difficulty in something.
Suppose I have two tables in MS access:
1) Jan2006
2) Feb2006
And these two tables have equal number columns. My focus is only to select a column named "CustomerNo" in both Tables in my MS access database (I converted from excel files using VB 6.0).
I am trying to find the common elements in both the CustomerNo columns in Jan2006 and Feb2006, using VB 6.0 (rs.find) currently, however I am unable to do so. After finding the common elements I wish to extract them into a new table and then go ahead with my other data files.
Exceptions:
(1) There are duplicate values in the CustomerNo column, which need to be skipped, when the common values are extracted
(2) I have 50,000+ rows of data, resulting in 600MB db file for pre-processing in this manner, needed a fast and optimizable way
(3) The number of rows are not same in any of the "CustomerNo" columns. However the data is numerical value like:
TABLE: JAn2006
CustomerNo
00200002
00200003
00200004
00200005
00200006
00200006
00200007
00200008
00200010
00200011
00200012
00200015
00200016
00200020
TABLE: Feb2006
CustomerNo
00200002
00200003
00200004
00200005
00200007
00200008
00200010
00200011
00200012
00200015
00200016
00200021
00200022
Here is the code I was working on, currently having a problem with the pointers using rs.find:
Dim cn As New ADODB.Connection
Dim cnstr As String
Dim sql As String
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim rs3 As New ADODB.Recordset
Dim strFilePath As String
Dim strloop As String
strFilePath = App.Path & "data.mdb"
cnstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFilePath & ";"
cn.Open cnstr
sql1 = "SELECT CustomerNo FROM Jan2006"
sql2 = "SELECT CustomerNo FROM Feb2006"
Set rs1 = cn.Execute(sql1)
Set rs2 = cn.Execute(sql2)
Do Until rs2.EOF
rs1.MoveFirst
strloop = rs1.Fields("CustomerNo").Value
MsgBox rs1.Fields("CustomerNo").Value
rs2.Find ("CustomerNo='strloop'"), , adSearchForward, 1
If (rs2.EOF = True) Then
Debug.Print rs1.Fields("CustomerNo")
End If
rs2.MoveNext
Loop
rs1.Close
rs2.Close
End Sub
Accessing An Access File Without Access
I am designing an application that will either query an API or and access file. The easier of the two options is the access file but I am not sure if it is possible to query an access file that is on a workstation with out access. Is it possible to run a query in VB that accesses an .mdb file with out installing acccess on that machine?
Thanks in advance for your help!
MJ
Accessing An Access Db Via LAN
ok, i've made this program for a school, which manages a few databases of the students (school info, payments, etc) now, they are asking me to make them a client app, which can access the *.mdb files that are stored at the main computer.
I'm quite new at using databases, so, i was wondering if any of you guys can point me in the right direction.
Thanx A million
Accessing Access Db Over The Net
Is it possible to access a ms access database from a client vb app over the net?
The database is to be stored on some webspace and can be reached by either ftp or http.
Is this possible?
Accessing Ms-Access Without Using ADO/DAO/Jet
I had given a task to create a application in vb where the data access implementation should be within the code.
The application should work whether the mdac components are installed or not in the client system.
i.e. the application accesses Ms-Access database and it should not use ADO/DAO/Jet for accessing data.
Is there a way or solution how the above is achieved?
or any other alternative is also welcome.
regards,
harish.
Accessing An Access DB With VB
I am setting up a VB form that connects to multiple tables in an Access DB. My connections are all good and work well but the problem is with my combo boxes.
If, for instance, I have a drop down called "Ice Cream Flavors" and the values are "Vanilla", "Chocolate", and "Strawberry", my combo box only shows "Vanilla" and doesn't show the other two in the drop-down. (Drop down is blank) Instead, I have to use the ADO arrows to make the data move. Is there anyway I can change it so that the information can be seen on a drop down instead of by clicking those darn arrows???
THANKS
Accessing Access
Hi all Gurus,
I hope you can help me...
I have two Access-DBs.
One with the program modules, the other with the data.
The one with the data has a password, and all tables are linked to the one with the modules.
This should be a Client-Server-Connection, so the position of the DBs could theoretically move.
I want to re-link the tables in the module-DB, so I use this code:
DoCmd.TransferDatabase acLink, "Microsoft Access", "C:QMSdata.mdb", acTable, Tables(I), Tables(I)
The Problem: in the data-DB are around 30 tables, and for each one he asks for a password.
my question: how can i set the password in the program code?
thx,
Tom
Accessing Access DB From Web...
Howdy all,
I donno if this is the right place to post this Q, but still..
I need to build a web page that will enable me to access my DB from a web page.
I assume it's gonna be ASP???
problem is that i dont have a clue about ASP.
Also... i need to update this DB from web.
i.e typing data and store it ..
Thanks
S.
Accessing An Access 97 Db Directly?
Hey everybody,
Me and my friend are currently trying to do a quiz program, where the questions are actually in image for (so as to accomodate diagrams), in this we stored the question(image) and the answer in a database.
Our program creates random numbers and stores the numbers in an array. These numbers then correspond to the possible 60 questions which can be asked.
Does anyone know of any functions, that allow you to access a record in a database by just using a record number? and also how to display images from a database?
(note i'm only a vb beginner and not too familiar with ADO , and stuff like that)
Thanks
Accessing Access DB Query Within VB
When accessing a certain Access DB query from within VB the Recordset object does not contain the specified record returned by the query i.e. "Recordset.EOF = True". Yet when I run the query from within Access the results show that there is one record returned, the record contains valid entries.
The database is an Access97 DB. The vb code was wriiten in VB6. The database was accessed using ADO via "Microsoft Jet OLE DB 3.51 Provider".
I did a test where I accessed the same query using DAO and the recordset did contain the returned record, whereas using ADO it did not.
Is there any explanation for this occurence?
Thanks in Advance!
Accessing An Access Database! :D
ey!, so newayz, dunno how to get certain field and records from an access database, ive had a look through some past topics, but there are no real outlines on how to do it.
im actually in the process of making a routefinder for a school proect, and what im aiming for it to do is to get distances from an access database.
any ideas/comments?
ConnectionString For Accessing To MS Access
hi
if i use MS Access as the database
what connectionstring in vb 6.0 that i can use so that different PCs can also access to that database.
or is it possible to do that if MS Access is used as database rather that sql server.
as i know sql server can do that, but not sure if it is also the case for MS Access
thx!
Accessing An Access DB Via Internet
For example, our database is located in Manila, Philippines and we have a branch in Cebu, Philippines (miles away), could we make it such that our branch could connect to our database here in Manila? What methods could we use?
I really hope for help in this, thank you so much in advance...
Accessing Access Databases With VB6.0
how do I access an access database and get at a give tables data or add items to a table. Anyone know any good tuts or something to get me started?
Accessing Access Query
Hi VB Guru,
Can anyone help me to solve this problem? Thanks in advance.
I'm trying to retrieve a recordset using ADO via a query defined in MS Access 97.
Can we create Stored Procedure in Access?
Thanks.
Best Regards,
Aaric
Accessing An Access DB On A Server?
Could anybody tell me me how to go about the following pb :
I am trying to access a temporary Access DB on a web server (internet), get all the tables data, send the info to a DB (which has same structure as the temporary) in local server(not in the internet) and empty the temporary.
Thank you very much for your help
Accessing An Access DB W/a Workgroup
Hi All,
I need to write a small VB 6 app that will pull data from an Access 97 DB and create a CSV file. But in order to access the data, you must be part of the workgroup with the appropriate permissions.
Has anyone done anything like this before? How do I allow VB to access the data while it uses the workgroup?
Thanks,
Mark
Accessing Access Database, Need Help!
i have this code and i need it to connect to a access databse.
Private Sub LstPrdct_KeyPress(KeyAscii As Integer)
If KeyAscii = 47 Then
Call LstPrdct_KeyDown(37, 0)
ElseIf KeyAscii = 45 Then
If LstPrdct.ListIndex > 0 Then
LstPrdct.ListIndex = LstPrdct.ListIndex - 1
Else
LstPrdct.ListIndex = LstPrdct.ListCount - 1
End If
ElseIf KeyAscii = 43 Then
If LstPrdct.ListIndex < LstPrdct.ListCount - 1 Then
LstPrdct.ListIndex = LstPrdct.ListIndex + 1
Else
LstPrdct.ListIndex = 0 'LstPrdct.ListIndex - 1
End If
ElseIf KeyAscii = 13 Then
prdctqty = InputBox("Quantity", "Enter Quantity", , 3270, 3050)
If Not prdctqty = "" Then
LstTtlnme.AddItem LstPrdct.Text
lstTtlQty.AddItem prdctqty
LblTotalQty.Caption = Val(LblTotalQty.Caption) + Val(prdctqty)
Dim conn As New connection
With Sijo
.path = App.path & "c:"
.Section = lstINI.Text
.Key = LstPrdct.Text
Dim PCode
PCode = .Value
.path = App.path & "C:Data.mdb" & PCode & ".mdb"
.Section = LstPrdct.Text
.Key = "WR :"
LstWRate.AddItem .Value
LblTotalWR.Caption = Val(LblTotalWR.Caption) + Val(.Value)
.Key = "RR :"
LstRRate.AddItem .Value
LblTotalRR.Caption = Val(LblTotalRR.Caption) + Val(.Value)
LstAmt.AddItem .Value * prdctqty
LblTotalAmt.Caption = Val(LblTotalAmt.Caption) + Val(.Value * prdctqty)
End With
PicLst.Visible = False
lstINI.ListIndex = LstiniIndex
lstINI.SetFocus
Else
Call LstPrdct_KeyDown(37, 0)
End If
End If
End Sub
note:
I have added a datalink and connection and specied the place where the databas is, and nothing.
Accessing MS Access Database In LAN -
Hi guyz,
I am trying to access a MS Access database, in my Local Area Network. Concurrently there would be three users who will be using the Program from three different workstations in the LAN.
So what would be the code to connect and access to the database,
And also, I'm having this doubt, whether any Locking(dead lock and shared lock) is required, in the case of updating records.
Thanking You in advance
Adhu
Edited by - adhuaj on 7/24/2004 9:23:24 AM
Accessing Macros In Access From VB6
Hi, been trying all day to get some info on this.
I thought I could do this via DOA & it's been a long time & I can't
I want to open and MDB database which isn't the problem and access / run a macrom from within this database.
Any help is apprecieated.
thanx in advance.
Issues Accessing The Access DB From VB6.0
I am trying to get this code to work that anouther person in my company wrote. The code worked when he ran it on some data a few weeks ago, but he has gone on vacation and I'm stuck trying to figure out how to get this other project done. Everything should be the same except the location of the database (which I changed). When I try to run it I am getting the following error
run time error '3021': either BOF or EOF is true, or the current record has been deleted.
Requested operation requires a current record.
When I Debug it is stopping at this statement
rsDep.MoveFirst
I believe my problem is for some reason the program is not accessing my access database correctly. I have a frm file and a .dsr file. I have checked the .dsr file and it is pointing to my database
The dsr file has a connection to conlbusd (which I have pointing to my access database file) It appears to be pulling up all the collums correctly, but when I run the program it is giving that error...
Anyone able to help?
TIA!
-Shawn
Accessing Access Reports With VB.Net
Accessing Access Reports with VB.Net
I am writing an employee information database in Access. The final menu item I would like to add is a printing capability. I know that I can use Vb.Net to print, but I am more familiar with formatting Access reports, so here is the question. Can I create a report in Access, based on the table that I am using in my program, and a have it print when: mnuPrint_Click? And if so, how or where should I look for the information. I have already run through my books to no avail and have not come up with the right key words to find the answer anywhere else.
Thanks
John
Accessing An Access DB Via Internet
For example, our database is located in Manila, Philippines and we have a branch in Cebu, Philippines (miles away), could we make it such that our branch could connect to our database here in Manila? What methods could we use?
I really hope for help in this, thank you so much in advance...
Accessing An Access Database Via VB
Is it possible to access a database residing on a web server via Visual Basic?
I am not looking for exact details on how to do this, just the general information on how to do it.
I have a Palm App that I am using to collect data. The data gets uploaded to a desktop PC, manipulated, then (hopefully) posted to a database on the website.
Any help would be greatly appreciated.
Thanks
Luber25
Accessing Access Query With VB6
Could anyone please try to help me to access a query from MS access with VB 6 and add / delete/ or edit in it
Although I'm Just a beginner but i'm guessing it's just as easy as accessing a table, Right? anyway plz provide me a code or atl east a sample VB 6 program
Accessing Access Reports
Hi all,
I am fairly competent in createobject (Word/Excel) and accessing or sending to those apps., however I am now in need of accessing a pre-created report in Access and am having trouble there.
I can currently activate Access, but that's as far as I can get.
Has anyone done this before, and if so can you send me the details please, otherwise I am going to have to recreate the reports with the Designer.
I will need to send parameters to the queries that the reports are based on. eg.
SELECT * from Customer
WHERE Suburb like "A*"
many thanks
philfr
Accessing An Access DB Via Internet
For example, our database is located in Manila, Philippines and we have a branch in Cebu, Philippines (miles away), could we make it such that our branch could connect to our database here in Manila? What methods could we use?
I really hope for help in this, thank you so much in advance...
Help With Accessing Access Report
Hello
I have a really weird situation going on with this client. This client is networked with a server. The server has the Access database shared on it. I have the VB program installed on each of the client computers with a mapped drive to the Access database on the server. The path of the mapped Access db on the server is hardcoded into the program. The clients have no problem connecting to the Access db and performing all the operations except one. When they try to run reports that have been coded in VB to access the Access db they get a runtime error that says: "Microsoft Access can't open the database because it is missing or opened exclusively by another user." This problem is driving me nuts. I have tried everything but can't get it to work. The code works fine and displays reports everywhere else except on the client's setup. It works on my development machine and I have even tried mapping the db to someone else's drive to see if I could recreate it but it works fine. I can't really trap the error on the client's machine because I don't have the development environment installed there.
Here is the code I am using to access MS Access:
[CODE]
Private Sub PrintReport(rptname As String, Preview As Boolean)
Dim appAccess As Access.Application
Dim strDB As String
Set appAccess = New Access.Application
'initalize string to database path
Const strDBPath = "E:"
'setup string to database path
strDB = strDBPath & "AMS.mdb"
With appAccess
'.CloseCurrentDatabase
.OpenCurrentDatabase strDB, False
If Preview = True Then
.Visible = True
.DoCmd.OpenReport rptname, acViewPreview
.DoCmd.Maximize
Else
.DoCmd.OpenReport rptname, acViewNormal
DoEvents
End If
End With
Set appAccess = Nothing
End Sub
[CODE]
Thanks
Any help would be appreciated
Dll For Accessing ACCESS Databases Through ADO
Can I get a Dll for accessing ACCESS databases through ADO. If I can use an existing dll for accessing databases from my application I wound not have to write a bunch of APIs for database access.
Randomly Accessing Access Records From VB
I am a student (almost a graduate, pending the completion of this project) creating a program in VB 6.0 to help students learn Spanish. The program will offer a handful of games that select words from a Microsoft Access 2000 database.
The game I am working on now is Hangman. I have the basic structure of the game completed and working. However, to get the game working I used a Case structure for the list of words used in the game, but now I need it to access the database.
Basically, I need to figure out how to randomly select a record from the database and set strWord = a value in one of the database fields. Does anyone have any ideas? Thanks in advance.
Here is my code for selecting the words so far ...
'open database
With datDictionary
.DatabaseName = App.Path & "spanish.mdb"
.Refresh
.Recordset.MoveLast
.Recordset.MoveFirst
End With
intRecordCount = datDictionary.Recordset.RecordCount
intCurrentRecord = datDictionary.Recordset.AbsolutePosition
'Word selection
intRandomWord = Int((intRecordCount * Rnd) + 1)
strWord = UCase(datDictionary.Recordset.AbsolutePosition)
Accessing Web Page Fields From Access
Does anyone know how to viewchange webpage fields from within Access? I have created the new object, made it visible and navigated to a page but when I try to access anything inside of the Document collection I get an error. I am building a db that will download my financial records and parse them for me, that is why I would like to pass strings to the web page (such as username and password).
Any thoughts?
Thanks
DOGG
Accessing Access Database Through Vb With Sql Commands
Hello folks! I would like to ask if there's a site that list some sql commands when accessing tables in microsoft access? I tried googling it but can't seem to find a site. If there's site of this kind can youn please share it to me? Thank you very much
Error On Accessing Access Database
"error accessing file. network connection maybe lost"
was the error i hit... i have no clue on what is wrong thus also
"unrecognised database format" was shown also .... can anyone help??? thanks alot.... have a nice day!
Problem With VB6 Accessing MS Access XP Database (is There A Fix Or Something?)
Hi,
I use Visual Basic 6 Service Pack 5, and Microsoft Access XP. So, I created a database with Access then I got a message at VB that says "Unrecognized database format" ... So, is this some incomatibilty between VB6 and Access XP? If so, is there some solution for that problem?
Here's the line ->
Set TestingBase = OpenDatabase("F:DataTest est.mdb", False)
I'll be glad if anyone helps.
Tnks,
Help In Accessing And Filtering MS Access Reports.
Hi again. Sorry for "spamming" your board with questions. I just need 'em badly right now.
I created a report using Access and I'd want to preview and print it using a VB application. How do I do this w/o using Access97/2K Snapshot? (actually, I'm open for using Snapshot, but I can't find a link to the freeware)
Also, how do I filter the reports coming from Access by using my VB application? How can I pass the SQL statements to the report I made in Access?
BTW, I'm using Access2K.
Thanks.
--------------------------------------------
Oh, and one more thing, can I create Access reports using SEVERAL tables or I can only use 1 table per report? (either create access reports using several tables in ACCESS itself, or using the VB application to create it for you)
Thanks.
Accessing Data In Cube From Ms Access
I've been looking for a easy (speak gui produced) solution for quite a while now. Problem is I could just code it into a module and go from there BUT I'll have to hand this over to a crowd that doesn't even know what VBA stands for, let alone how to troubleshoot or change stuff.
I can't make out any way to access a cube from ms access in a way that would allow me to work with the data and not just display them in a data access page.
Any help on that would be apreciated.
Edit by morsnowski: I know I can get a cellset, cast it into a table, create an update function, stuff all that into a macro and make it available to joe public but I really would like to avoid doing that.
Difficulty Accessing Access Tables
I am writing a program to access an Access database to take addresses (etc) and place them on a page for print, I found that I had hard-coded into the ADO field RecordSource a table name but now only recognizes that table. I tried to construct an SQL leaving the recordsource attribute blank but I am getting a message that does not like that, yet the program continues to run. I have tried to change the table names of copies (of the database)for testing (complication version 2000?) changing the first few records so I could recognize which database was accessed yet I get the same data regardless due to a table name even trying to allow a new database with its related table name (a flat file). (it must really get fun).
I wish to allow any valid database in this subdir to be loaded and handled as a mailing list. If more code than shown is desired please let me know.
::::::
Code:
Private Sub cmdOpenDatabase_Click(): rem command button checks for existence of filename highlighted ltem in a list
Database = lstDatabaseNames.Text: rem the List of available databases
If Database = "" Then Exit Sub
On Error GoTo NoDatabaseFound
Open Database For Input As #1
Close #1: rem checking for existence
adoDataSource.Caption = Database:
FromDB = Left$(Database, InStr(1, Database, ".") - 1) : rem Strip extension
'rem OK so far :p 'Rem then this error
adoDataSource.RecordSource = "Select * from " & FromDB & ";"
':rem works if hard coded if a specified tablename
'(a hard coded name in the record source field) but get error if assigned via code because left blank because I don't know the table name yet
Set MailAddress = adoDataSource.Recordset
'rem I get SET error here if recordset is blank unless I use design time data
Records = MailAddress.RecordCount
rem second error here above If I do not give recordset value
rem processing section to follow not relevant to problem...
Exit Sub
NoDatabaseFound:
MsgBox "Error loading database: " & Err.Description, vbOKOnly, "Error"
Err.Clear
Stop
End Sub
::::::
I'm not sure what questions to ask. (Blame it on MS^tm ) Can't I assign the table after opening the file... (emoticons can be addicting, no?)
(I'd rather work with ASCII ) P.S indenting not shown, sorry
|