In math speak, "and" is what is used for the decimal point.
1.1 in English is; one and one-tenth.
Therefore, it is not correct to state that 125.15 is;
one-hundred and twenty-five. The "and" is used to mark the decimal point. So, it's one-hundred twenty-five and 15...
The addnew must be the first statement. You cannot reference any field in a table that is empty.
You need to have an "if" statement immediately following your "open" that checks for an empty result.
ie:
table.open etc
if table.bof then
addnew
populate fields, etc...
As snaggs stated "" is a null STRING, meaning a string variable with no characters. Null is not the same as "" and "" is not the same as a space, ie " ". 3 different values, null, null string and space.
You can check for Null several ways:
If...
How do you create "Help files" in VB6?
Do you need 3rd party software or does VB provide a wizard or tool?
Has anyone done this?
Help please.
Jim
You can check the first position either of the following ways using COBOL II.
01 fielda.
05 fielda-pos-1 pic x.
05 fielda-other pic x(15)
if fielda-pos-1 = '3'
etc
end-if.
or
01 fielda pic x(16).
if fielda(1:1) = '3'
etc
end-if.
the (1:1) is of the format (start position ...
the showsave method does not re-initialize some properties.
during the save, if you change a drive or directory, the curdir is changed and remains changed. So is the commondialog.filename and commondialog.initdir.
this MIGHT cause a problem when you re-enter the procedure. The error 75 could...
While you are in development/testing, you can go to "tools/options/general" and click the "break on all errors" option.
Run the program in IDE with the "run" option.
VB will break and highlight any statement that causes an error.
Do not leave this on when you...
Well the answer is embarrassing.
Under VB "tools/options/general" I had the "break on all errors" button checked. This traps the error before any error handling.
The MS tech was embarrassed also, but his expertise was in the mdb area which I thought was the original problem.
Just noticed your WHERE clause.
You need to be careful when you mix AND's and OR's.
Conditions are split on OR's and combined on AND's. I'm not sure your statement is what you really want.
It will return ALL records with paycode '2' (regardless of the value of DeleteRec OR
all records that...
A Null and a null string are 2 different things.
The following statement:
If fielda = "" Then ' is a check for a null string value in a string field.
Empty fields from the result of a left join return Null values.
SO, you need to check any field from the EmployeeHours table for a...
The connect string I gave you uses ODBC. If you want to use only OLEDB then change the connect string to:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=pathtoyourDB"
as you already had.
The main item is to point to the activex data objects 2.1 or higher in the "project...
You need a LEFT JOIN type of query.
SELECT Master.*, Hours.*
FROM Master LEFT JOIN Hours ON Master.numid = Hours.t2numid
WHERE Master.Paycode = 2 ORDER BY yoursequences;
This will give you ALL employee masters of type 2. If there is no matching Hours record, those fields will be null.
Check...
They are supposed to get back to me today, but I discovered something strange.
It fails in the IDE (debug "run") mode, but after I do a "make" (compile) and execute the .exe it WORKS!
Also, it does NOT fail on my Windows 98 machine in either mode. So, something is wrong...
I called Microsoft support. They said it should work. I sent them my sample project and it worked on their machine, but not mine. He was using Windows 2000, I am using Windows ME.
Microsoft is going to get back to me. The guy was stumped.
I haven't tried it on my Windows 98 machine. I'll do...
I'm having a lot of pain going from DAO to ADO also.
You need to reference the following to use ADO. From what I got from the MS knowledge base.
Microsoft ActiveX data objects 2.5 Library
Microsoft Jet and Replication objects 2.5 Library
and
Microsoft ADO ext 2.5 for DDL and security
Here's a...
I have a project that I'm changing from DAO 3.51 jet to ADO
The on error resume next doesn't work. In the old access when I did an object.addnew then object.update, I could set on error resume next and check the error code after the update to determine if a duplicate key was found.
Now, it...
If you want to be lazy and don't care about effeciency you could do the this:
put a listbox control on your form and set the "visible" property to false. Set the "sorted" property to true.
Then
dim itemstosort(100) as string ' assume this array is filled with items
dim ix...
I resolved the problem. I was using Jet 4.0 OLEDB and trying to access an Access 97 database. When I converted the db to Access 2000, the seek command worked.
This pretty much ties ones hands. DAO can't access 2000 and Jet 4.0 can't work with access 97.
When I try to use table.seek with the 4.0 Jet in VB6 I get an error 3251 stating that "the object or provider is not capable of performing requested operation"
Why is that? I thought you could use seek with Jet 4.0
Thanks,
Jim
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.