Is the drive mapped? Then DriveLetter:\Path\File.Extension NO? Then use a regular UNC path format.
Good Luck
Is the drive mapped? Then DriveLetter:\Path\File.Extension NO? Then use a regular UNC path format.
Good Luck
strSQL = "SELECT * FROM tblName WHERE dDateField >= " & DateAdd("d", -1, Now)
as an example.
Good Luck
Use the DateAdd function...
?now
7/10/2009 9:26:48 AM
?dateadd("d",-1,now)
7/9/2009 9:27:13 AM
Good Luck
Use the data form wizard with the ODBC option. Then to get rid of the ODBC DSN see http://www.connectionstrings.com for a DSN Less connection.
Good Luck
All of the above is possible, just remember that you need to manipulate the enabled and interval properties correctly.
Good Luck
Then you have no way to uniquely ID the record which means you could get erroneous results if you have any kind of parent child relationship.
Good Luck
You will have to either create arrays to hold the individual values or you can simply test for them via if statements.
Good Luck
Call this my own little quirk but I like to check all three indicators when returning a recordset. (I also for readability like to do it long handed.)
If rs.RecordCount <> 0 And Rs.Bof = False And Rs.Eof = False Then
TxtPosition.Text = rs.Fields("Position").Value
Else
TxtPosition.Text = vbNullString
End If
Don't know if changing that will work for you but go ahead and give it a try.
Good Luck
See cguan_77's post. They have the right answer.
Good Luck
I've answered this already, have you seen that reply?
Not that I have done this but I read somewhere in some forum that you should change the image field to a binary field and load the binary data into it.
Now, as for asking for full code, that is one of the fastest ways in which to have your thread ignored by anyone who might have been willing to help you. It is just a turn off. How about you try and figure it out and post what code you have.
Good Luck
I find CR to be more flexable especially when it comes to program maintence.
If data="no active" then send to table 1
strSQL = INSERT INTO Table1...
ElseIF data="active" then send to table 2
strSQL = INSERT INTO Table2...
EndIf
BTW: You should never use the END statement to stop your program.
Good Luck
This may also happen with a JOIN query in a PARENT/CHILD relationship. For every record in child that matches parent, parent will show a record. If not using a join query see post above.
Good Luck
One table at a time. First Parent table then child table records. You can use the .AddNew method if you have a seperate rs for each table or use an insert into statement and execute it with the command object.
Good Luck
try this:
Sub xx() Dim txt As String Dim x As Variant Dim i As Long txt = "10,11,12,13,14,15,16,17,18,1,2,3,4" x = Split(txt, ",") For i = 0 To UBound(x): Next i MsgBox "There are " & i & " numbers in your text area" End Sub
Ahhh....
Why not just use ubound+1?
Sub xx()
Dim txt As String
Dim x As Variant
Dim i As Long
txt = "10,11,12,13,14,15,16,17,18,1,2,3,4"
x = Split(txt, ",")
MsgBox "There are " & UBound(x) + 1 & " numbers in your text area"
End Sub
Good Luck
You can't as far as I know but then again you may be able to subclass the control. You can however use a standard textbox control and set its initial text to " / / ", then test for numbers on keypress to make sure user is entering numbers and if user has entered a number then you would replace the first space with what the user has entered. On the other hand you could use the DTPicker(date time picker) control with a custom format if needed and just allow the user to pick the date.
Good Luck
Quote From PM
I have right click on the toolbox and select components in tab Designers don't have Crystal Report 11 , But in tab designers have crystal Report 8.5
I don't know how to solve a problem
my Crystal Report 11 is ...CR Professional: Product type : Full
Product Version : 11.0.0.895
Don't know what to tell you Candy. Try designing your report with 11 but add the 8.5 controls and see if you can view your reports. It just may be that the 8.5 activex controls will allow you to use the 11 reports.
Good Luck
I have requested this thread to be closed because it sounds to me like you are wanting to hack the username and password off of a users/multiple users systems. THIS IS AGAINST THE LAW!
If this is not your intention. Please start a new thread with a better explanation of what you want to do.
Okay, this example works with both 2.5/3.51 and 3.6...
Dim daoDb As DAO.Database
Dim daoTd As DAO.TableDef
Set daoDb = DBEngine.CreateDatabase("C:\z\MyDB.mdb", dbLangGeneral, dbVersion30)
Set daoTd = daoDb.CreateTableDef("MyTable")
daoTd.Fields.Append daoTd.CreateField("iID", dbLong)
daoTd.Fields("iID").Attributes = dbAutoIncrField
daoTd.Fields.Append daoTd.CreateField("vFName", dbText, 30)
daoTd.Fields("vFName").AllowZeroLength = True
daoTd.Fields("vFName").DefaultValue = "Enter First Name Here"
daoDb.TableDefs.Append daoTd
Set daoTd = Nothing
daoDb.Close
Set daoTd = Nothing
Good Luck
As I said, search the web, there are lots of examples out there...
Good Luck
if you are talking UPPER CASE and lower case the look at UCASE and LCASE
Good Luck
That all depends upon if you allow those fields to default to their default values or not. As for changing those default values lets see your table creation code...
The simplest way I know of is to use a mask color to hide portions of a form but allow the controls to still show. I'm sure if you search vb6 transparency or vb6 form transparent/transparency at you favorite search engine, you will find plenty of examples.
Good Luck
So then you are using this as your mask?
MEB.Mask = "##/##/####"
And you have a problem with the way the control displays this in the standard way that people have come to know?
A couple of ways...
Dim P As Printer
Debug.Print Printer.DeviceName
For Each P In Printers
Debug.Print P.DeviceName
If P.DeviceName = "The Name of the printer" Then
Set Printer = P
Exit For
End If
Next P
Debug.Print Printer.DeviceName
or by using the common dialog control
Debug.Print Printer.DeviceName
CD.ShowPrinter
Debug.Print Printer.DeviceName
Good Luck
The simple answer is...
Printer.Print Text1.Text
Good Luck
Once you have the functionality tested and up and working then use that to make sure your program is licensed prior to showing any form or whatever. Easiest way is to use a sub main, make the call from there and if verified, show your form, if not display license form. If license key valid then show form, else show msgbox saying invalid key, program now exiting.
Good Luck
To add items to a list box you use the additem method...
List1.AddItem "MyString"
To make your list box allow multiple selections set its multiselect property to true on/in the property box.
To run through the list to test which one(s) have been selected. Use a for loop...
Dim ForLoopCounter As Integer
For ForLoopCounter = 0 To List1.ListCount - 1
If List1.Selected(ForLoopCounter) = True Then
'do something
End If
Next ForLoopCounter
To remove an item or items from a list box. Once again use a for loop but this time do it backwards...
Dim ForLoopCounter As Integer
For ForLoopCounter = List1.ListCount - 1 To 0 Step -1
If List1.Selected(ForLoopCounter) = True Then
List1.RemoveItem ForLoopCounter
End If
Next ForLoopCounter
use the menu editor to create your menu items and if you don't know how to use it, there are several tutorials out there, just search the web.
Now to enumerate through all the fonts on the system, use a for next loop...
For ForLoopCounter = 0 To Printer.FontCount - 1
List2.AddItem Printer.Fonts(ForLoopCounter)
Next ForLoopCounter
That should be enough to get you started. If you have any more questions google and yahoo are your friends as is this forum.
Good Luck
Well, if you want to create a "License Key" to activate a program or to enable all of its functions, there are several ways you can do this. Now, if you want to have the ability to have virtually an unlimited number of "License keys" then you need to figure out some sort of formula for creating a key and deciphering the key to check if it is valid. Once you have that, then you need to figure out where your going to store it. More than likely the registry.
So from here I could just go ahead and say good luck, but I don't think you would be satisfied with that as I really have not given you much of an idea on what to do. So here is a thought...
Microsoft now has what 5 fields to enter information in and each field is what 4-5-6 characters? Okay so we will go with that as a basis for our key.
Now lets start with some functions that we can add to any program by just dropping a module or two into said program.
First lets start by using the formula for determining if a number is prime or not (search for it on web).
Now, search for base conversion vb6 on the web. You should be able to find several algorithms that will convert any number from binary to base 36 (0-9+A-Z) or anything in between.
Do you see where I am …
See the following in VB's help file on the index tab...
FreeFile Function
Open Statement
Input Function
Line Input Function
Print Statement
Close Statement
Good Luck
Hmmm... I thought we were in the VB Classic forum!!!
Yes, just opening the IDE and creating a program alters the registry of the machine the program was designed on.
Oh, you mean when you install the program? Yes, when you install the program on another machine there will always be registry entries. The more dependancies you have the more entries will be made (unless those dependancies are already on the computer in question).
As for the question that was attempted to be answered by the VC++ answer, well you can read, update, and insert values into the registry with the SaveSettings and GetSettings VB Functions or if you need more control, you can use the following API's
RegCreateKey or RegCreateKeyEx
RegDeleteKey
RegQueryValue or RegQueryValueEx
Good Luck
This has been discussed in many a forum and to get to the short of it. NO. You cannot guarantee that some user who has bought a license will not install your app on several machines. Well what about hard drive serial numbers? They change if you format them. How about the CPU ID? And if it is disabled by the user because of the outcry of the public when Intel introduced it?
In short, no matter what you do, someone if they really want to will get around everything you try to do to keep your program secure.
Good Luck
Okay, several way in which to do this but let me start at the bottom and work my way up...
Yes it is possible to redimension arrays based upon a variable value...
Dim MyArray() As Integer
Dim MyValue As Integer
MyValue = 10
ReDim MyArray(MyValue) As Integer
Debug.Print UBound(MyArray)
Now, as for accessing an excel file there are several ways. You can use ADO and treat it like a database and return your data in a recordset. See http://www.connectionstrings.com for connection string information if you need it or you can search the www at your favorite search engine for vb6 excel and you will find many examples out there.
Good Luck
Your welcome.
Okay, to get or set controls in other forms it is as simple as...
'we are in form1 and we want the width of label1 in form2
MyVariable = Form2.Label1.Width
or to set...
'we are in form1 and we want to set the width of label1 in form2
Form2.Label1.Width = MyVariable
Good Luck
Look up INNER JOIN in either SQL's Help files or Access's help files
Good Luck
With a little research at yahoo or google, you can find all of the code you will ever need.
Good Luck
There are differences between the retail versions of CR. Meaning you need a developers license/version more than likely, as there are versions that cannot be used by a programming environment to be added to a program. Or, you may just need to browse to where CR is installed. Then again, 11 may not support VB6. I have 10.5 that came with with studio 2k8 and I can see the 10.5 from VB6.
Good Luck
Look up tables
tblBadges
iBadgeID (AutoNumber, Primary Key)
iBadgeNo (number)
tblEmployee
iEmpID (AutoNumber, Primary Key)
vFName (text)
vLName (text)
operations table
tblBadgeStatus
iStatID (AutoNumber, Primary Key)
iBadgeID (Foreign Key)
iEmpID (Foreign Key)
bActive (Boolean T/F Active or not)
iRecycleStatus (number)
dIssueDate (Date)
which can also double as your history table
NOTE: There are way too many ways in which to organize your data and however you organize your data it needs to fit your requirements.
Good Luck
very vague question, perhaps some code or a further explanation of what you mean.
Good Luck
Another PM...
Hi just now you reply me post thank a lot.
I want to tell you more detail and point out if i'm wrong.
1. I have an badge ID need to get data from two different table.
2. One table is contain a new user of that badge ID, another table contain the previous user of the badge id.
3. After get the data it will show on the data grid of the vb program.
4. The data grid will show all the information of the two table further more it can edit the data inside the data grid.
So can it work if i do like that, i need to know before i write the code. I not sure i need your opion
Okay, I understand a little more...
You have a badge table, an inuse table, and a history table...
Well, from everything you said, if I understood you correctly, it sounds like you should be able to do everything that you want. However, there are a lot of different things that you want to do, so I would suggest you break it down into small tasks and if you need any help on one of those tasks, don't be afraid to post you question.
Good Luck
If CR is installed correctly on your system and you are actually using VB 6.0 and not VB.NET then you should be able to find the references under Project>References. For the control, if any, right click on toolbox and select components. Use their help files to see the examples on how to use.
Good Luck
NO! That is for you to do and for you to learn how to do!
To display version number...
Option Explicit
Private Sub Command1_Click()
MsgBox App.Major & ":" & App.Minor & ":" & App.Revision
End Sub
Good Luck
seems like there are plenty of resourses out there...
http://search.yahoo.com/search?p=vbscript+active+directory&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8
Good Luck
So do I, but depending upon how responsive the program needs to be I may even go as low as 10ms, but OP was trying to use a timer for a delay...
Okay, if one table is a listing of ID badges and the other table is a log table of when that badge is used (login/logout) then yes, that sounds like the correct database structure.
Good Luck
IsDate anybody???
Good Luck