Yes,...
Do you know how to use the menu editor?
If so, then the command you need to know is PopupMenu.
Good Luck
Yes,...
Do you know how to use the menu editor?
If so, then the command you need to know is PopupMenu.
Good Luck
does not matter, debug.pring statements are ignored by the compiler so this is not your problem.
Keep Looking
Good Luck
Are you sure you are using Visual Basic 6.0 and not VB.NET or VBA (access, word, excel,etc)?
WHERE staff_badgeTracking.Badge_ID = 1234
Good Luck
"WHERE ALRAJHIBANK.ID = " & itemID
Good Luck
once again...
SQL = "INSERT INTO TableName(Field1Name, Field2Name, ...) VALUES(" & val(text1.text) & ",'" & text2.text & "')"
Where TableName is the name of your table
Where Field*Name is the name of the field you are going to add data to
Where val(text1.text) is adding a numeric value to Field1Name
Where '" & text2.text & "')" denotes adding text to Field2Name
Good Luck
You may also have to prefix badge id with one of the two table names since you have an inner join on badge id.
Good Luck
What you can do is create a temporary table by inserting into (you've seen this before) and then retrieving your records from that. Then delete the table or just keep it around and when you are done delete the records from it. Now, since you are using SQL 7.0 you could create a stored proceedure to accomplish this by using a memory table (a table created in memory, filled with information, and passed back to your application) however, I would suggest that you use http://www.dbforums.com for them to help you get the correct syntax you will need.
Good Luck
Create an ODBC DSN and test it to make sure it works.
Then use the Data Form Wizard with the ODBC option. You will find it under Add-Ins>Add-In Manager.
Run this wizard as many times as needed to create every combination of form type with code/class/control. Then save this project for future reference.
Then when you are ready to goto a DSN Less connection goto http://www.connectionstrings.com
Good Luck
Well, I don't see where you are opening the recordset rs but I do see rstrack being opened. Is that the recordset object you want to assign to your grid???
Good Luck
Well, you can set the format from the DTP or you can use the functions I mentioned above and when you query you may need to use the # symbols around the date if access.
Anybody else want to pipe in???
Good Luck
SELECT INTO staff_badgeTracking (400001, 12345, nana)
SELECT staff_badgeTrackingNew.400001, staff_badgeTrackingNew.12345, staff_badgeTrackingNew.nana FROM staff_badgeTrackingNew
Good Luck
Here is a way to check to see if the server is up and running...
http://www.tek-tips.com/viewthread.cfm?qid=1560292&page=1
which should be sufficient for your needs.
Good Luck
It looks like you are trying to pass a date in the format of day month year. For this to work your database needs to be in the same format and most databases use the format of month day year.
Good Luck
It looks fine to me but here are a couple of things to check before you execute your SQL statement...
1) Check the connection to make sure it is open
2) Remove the space before select (really should not have to but what the he.. if you know what I mean).
3) check in help files to make sure that a static rs is valid with optimistic locking
Good Luck
SELECT INTO staff_badgeTracking (Field1Name) SELECT ...
You need to use the name of the field in between those parens without any single ticks ', then it should work for you.
Good Luck
Format function, FormatDate Function...
Good Luck
SELECT INTO Table2 (Field1, Field2, Field3) SELECT Table1.Field1, Table1.Field2, Table1.Field3 FROM Table1
As table2 already exists.
Good Luck
Looks good but query should not be in keydown event as every keypress will make your query run. Use any of the following so the msgbox does not pop up.
1) test the length in the textbox to make sure the minimum number of required character are entered (in this keydown event)
2) use lost focus event of text box
3) use command button to do the search
Good Luck
Can't use a for each...
Dim I As Integer
For I = 0 To Printer.FontCount - 1
Combo1.AddItem Printer.Fonts(I)
Next I
For I = 0 To Screen.FontCount - 1
Combo2.AddItem Screen.Fonts(I)
Next I
I believe that screen.fonts will return more fonts (at least on my computer). Check the count on yours. Also, they do not come ordered so you should make sorted = true.
Good Luck
Okay, the reason your access database/vb6 creates that error is because VB6 is quite dated and to resolve that problem you would need to save your database to a previous format. Once that is done you should be able to run the wizard but as for converting back to the database format you want to use, I don't think the ADODC will be able to handle then new format (maybe it will if you change its connection string through code but I have never tried, I always use code).
Good Luck
6th line down has an exit sub right after the end if on line 5. From what I can tell this is executed so the rest of the code is not. Also, your inner join query is incomplete and will/should raise errors when you attempt to try to open it.
Good Luck
so replace it with your textbox.text... I could for money but will not do it for you for free. You must learn how to connect the dots yourself sir. You have all the information so please use the right (?) side of your brain. (Right side is logical side right???)
Good Luck
See previous post!!!!!!!!!!
try something like....
SELECT * FROM Table1 WHERE (Date1 >= DTP1.Value AND Date1 <= DTP2.Value) AND (Date2 >= DTP1.Value AND Date2 <= DTP2.Value) AND (Date3 >= DTP1.Value AND Date3 <= DTP2.Value)
Which is or should be the same as the between statement and if this does not work use access's query design window to help you create the query one step at a time.
Good Luck
class is the name of the field, at least that is what you showed above. If your field name is different then use that name...
Good Luck
Several ways....
Dim F As Form, M As MDIForm
For Each F In Forms
If F Is M Then
Else
Unload F
End If
Next
Dim F As Form, M As MDIForm
For Each F In Forms
If F.Name = "MDIForm1" Then
Else
Unload F
End If
Next
and I could probably think of a few more but either one should do ya!
Good Luck
They are constants defined to tell the dll that you call what to do.
As for red/black you need to search on using a mask color transparency vb6.
Good Luck
SELECT MAX(roll) AS THEMAX FROM TableName WHERE class = 'nine'
Good Luck
Start a new standard exe project>vb's ide menu>Add-Ins>Add-In Manager.
Hightlight VB 6 Data Form Wizard
Lower right corner of form where frame with caption says Load Behavior put a check in the box next to Loaded/Unloaded>click Ok
Add-Ins>Data Form Wizard
Follow wizard enough times to get every combination of form type along with code/class/control.
Save project for future reference.
Good Luck
Okay, lets say we have this table...
Table1
iID (autonumber unique ID)
iValue (Number Long)
and data has been entered like so...
iID iValue
1 4
2 8
3 1
4 3
5 9
6 2
Now to get the LAST record entered we would use...
SELECT TOP 1 iValue FROM Table1 ORDER BY iID DESC
To get the greatest number entered into the iValue field we would use
SELECT MAX(iValue) AS TheMax FROM Table1
and reference it via the alias TheMax (Rs.Fields("TheMax")
Good Luck
Well the between operator is for use on one field so...
SELECT * FROM Table1 WHERE (Date1 AND Date1 BETWEEN DTP1.Value AND DTP2.Value) AND (Date2 AND Date2 BETWEEN DTP1.Value AND DTP2.Value)
As for three dates...
SELECT * FROM Table1 WHERE DATE1 = Value1 OR Date1 = Value2 OR Date1 = Value3
Good Luck
Only problem with that johnly is using the change event of the textbox. As the lookup code (number/alpha) gets longer your code will be executed each time there is a change! Which means for a four digit code, your code will pound the datbase four times with your look up query! Better to put the actual search under a command button (or perhaps the lost focus event of the text box if you want a high amount of automation).
sackymatt,
Have you even tried the Data Form Wizard and see what code it generates for you?
Good Luck
Yes, this is all about API...
The Private/Public Declare Function/Sub is the give away.
Now what this code does is it alters the forms opacity level, which means the higher the alpha value the more opaque or less transparent the form is.
As for learning API there are many sites out there like this one...
Good Luck
See my post in your other thread...
Good Luck
For MD5 there are a couple of ways...
See strongm's post about 1/4 of the way down in this thread...
http://www.tek-tips.com/viewthread.cfm?qid=535644
or there is a post at http://www.pscode.com that is a module that calculates the MD5 hash. (Strongm's is faster).
Good Luck
Okay, user types in a badge ID that they have in hand, and then hit a search button or a search is done and the data grid is populated with a bunch of information.
Now depending upon if the user is handing the badge to the employee for the employee to use or taking it back you have to either a) make an entry into table1 to note that the badge is in use or b) make an entry into table2 to note that the badge is no longer in use.
So you are going to need an if statement that test to see if information is going into table1 or table2.
Now, if I have understood you correctly so far... If the information is going into table1. Then you will need to insert that information via an insert statement into table1 or if the information is going into table2, then you will also need an insert statement but the values of this insert statement will be coming from table1. After that, then you will need to delete the information from table1.
Okay, so if I have this right then...
If condition means insert into table1 then
INSERT INTO Table1(Field1, Field2, Field3,...) VALUES (Value1, Value2, Value3,...)
Else
INSERT INTO Table2(Field1, Field2, Field3,...) VALUES (Value1 from table1, Value2 from table1, Value3 from table1,...) WHERE Table1.Field = unique criteria
'execute query
DELETE FROM Table1 WHERE Field = unique criteria '(same unique criteria …
Yes, you will need an if statement.
The code I gave you is for creating a new table from an old table, as in all the records from table1 will be inserted into table2 of which table2 is created. The result is that you will have two tables with the same information. And once again. I ask why?
Good Luck
Several ways in which to do this and it all depends upon how your database is designed and the code you have. It could be something as simple as rs.delete or strSQL = "DELETE FROM Table1 WHERE FieldCriteria = " & SomeCondition
Good Luck
Yes it is possible, and with way too many ways in which to describe in just a single post. So lets break your question down into simple strait forward tasks.
First, you have badge ID's. How do you display them? ComboBox, Grid of some sorts, or is user supposed to know these badge ID's from memory?
Second, you have employees. How do you access them? Display Them?
Need help with code? Start with data form wizard.
Good Luck
Normally used in classes, for setting retrieving property/variable in class. Think also activex, user controls, objects, and such.
From VB's help...
Set
Declares the name,arguments, and code that form the body of a Propertyprocedure, which sets a reference to an object.
Let
Declares the name,arguments, and code that form the body of a Property Letprocedure, which assigns a value to aproperty.
Get
Declares the name,arguments, and code that form the body of a Propertyprocedure, which gets the value of a property.
Good Luck
Okay, I just refreshed my memory on the Data Form Wizard and refreshed my memory on what you said...
>( as all my textboxes are named "textfields")
Which means your textboxes are an array and to double check I used the wizard to make sure that it creates an array of textboxes. SO YES you have an array of text boxes as they are all named "textFields"!
So to pass the combo's text to one of the text box controls you will need to use it's index!
Text1(Index).Text = Combo1.Text
Good Luck
Okay, you have an array so it would be...
Text1(Index).Text = Combo1.Text
Good Luck
as an example...
strSQL = "SELECT Table2.iID, Table2.iNum INTO Table3 FROM Table2"
Good Luck
Use the click event of the combo and set the text of the text box to the text of the combo box...
Text1.Text = Combo1.Text
Good Luck
No, you got it right...
tblAddress
iAddID
vStNo
vStName
vCity
vSt
vZip
1, 123, Street A, SomeCity, SomeState, 12345
2, 234, Street B, SomeCity, SomeState, 23456
tblName
iNameID
iAddID
vFName
vLName
1, 1, Jane, Doe
2, 1, John, Doe
3, 1, John, Doe Jr.
In this example the Doe's all live at the first address hence the one to many relationship identified by the foreign key
Good Luck
Use the data form wizard. Search my handle and those keywords to learn how to invoke it, use it, and what to do with it.
Good Luck
Unload Form1
Unload Form2
Every form?
Dim F As Form
For Each F In Forms
Unload F
Next F
Good Luck
Okay, the reason you are getting the results you are getting is because there is no unique identifier that relates the two tables together and you have no selection criteria.
Table1
iNameID AutoNumber
vName (BTW NAME is a keyword that can cause confusion)
iRoll Number
Table2
iClassID AutoNumber
iNameID Number Foreign Key
vClass (BTW Class VBA Keyword)
dDate (BTW Date KeyWord)
Good Luck