I am working in VB6 with and Access.mdb database.
I get a syntax error on the Alter Table query statement below. I have tried to change it but I cannot seem to beat the problem.
Using the .Open statement I have done selects/insert/drops/deletes and updates so that does not seem to be the...
How would one display the contents of a table on a form?
After the user provides the search criteria and a name for table about to be created, he will click the command key and the table will be created with all the data that matched the given criteria.
Then I want to show the user the data...
I have a text field on a form.
It is for entry of a number which I use in a calculation.
When I use it in an expression like Some_integer - Text1 it gives the message "Argument not optional and highlights Text1.
When I try the command data_numeric=Val(text1.text) it gives me an error saying...
At the risk of sounding dumb:
I need to know how to paint a numeric field on a form or convert a text field that receives a numeric value into a number so I can us it in a math calculation.
Thanks!
I am trying to use a DBCombo box.
It reads a Access.mdb table with only one field.
It works fine when I bind it to a Data ocx object on the form. It works fine, that is, as long as I set the Properties of the Data ocx object to:
DatabaseName = Access.mdb full path (Ex. C:\etc.)...
How can you, in VB, find the Table names that are located in a given database?
For example, say database TEST_DB contains the following tables: TableA, TableB, and TableC.
What command would return "TableA TableB TableC"?
I would like to try and implement this through VB to check if a table...
I have and ODBC mdb with two tables and each table has matching data in key fields:
1. CustomerMaster, its key: CMOurAcctID
2. CustomerProductCrossRef, its key: AccountID
Table 1 has only one record for each key value while table 2 may have as many as 40+ records for the same value (many to...
To the best of my knowledge, my co-worker and I have our PC's and VB environments set up the same.
The following Sub runs fine on my PC but when I send it to my co-worker and he loads it onto his PC in VB it will not run but gets the error message:
" Syntax error in the FROM clause"
and the...
NOTE: The code below works just fine!
Private Sub cmdCreate_Click()
Dim DBo As New ADODB.Connection
Dim DBi As New ADODB.Connection
Dim rsRead As New ADODB.Recordset
Dim rsWrite As New ADODB.Recordset
Dim InsertFields As String
Dim SelectCriteria As String...
I have two Access databases (mdb1 & mdb2) that are accessed via ODBC. Both mdb's are in different directories and nether one is in the VB default directory.
I need to know the most efficient way to code for opening each database and reading every row from a table in the first database...
How do you use nested quotation marks in a string?
I need to put double quotes in to a string and cannot find out how to do it.
Ex:
x = " "Some string" "
I have tried several ways but cannot find how to do it and cannot find it in a book, etc.
Help appreciated!
Thanks!
I am trying to open two databases and read from a table in one and insert it's data into a table in the other.
The database I am inserting into is in the current database (CurrentDB) and the databaase I am reading from (RemoteDB) is in another directory.
If I have the table in RemoteDB linked in...
This is the code that causes my problem:
Public db As Database
Public recset As Recordset
Private Sub Form_Load()
Set db = OpenDatabase("C:\Documents and Settings\res982\My Documents\Nwind.mdb")
Set recset = db.OpenRecordset("Customers", dbOpenTable)
If recset.EOF = False Then...
I need help on getting the following code to run!
I have been testing some code from the "MS 2000 Scripting Guide". Its link is:
http://www.microsoft.com/resources/documentation/windows/2000/server/scriptguide/en-us/sas_ser_zhcb.mspx
This code was referenced in thread707-930084; The reference...
QUESTION:
How can I, without corrupting records, access the multi-user mdb exclusively in VBA so it can be compacted (or anything else I may want to do with it)?
SITUATION:
I have an mdb on a server that is multi-user.
There are many clients that run against this mdb via a VB application.
All...
1. How can I stop/restart Windows Services which are in Windows Administrative Tools automatically from within VBA?
2. How can you replace a remote mdb with another using VBA?
The situation:
I have an mdb on a server that needs to be compacted every night.
It is a multi-user mdb and is only accessed through VB via ODBC. It has no forms, etc and is strictly used as a database.
I need to make sure everyone is out of the mdb (and they should be after mid-night) and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.