Latest Tracked Messages Textbox (keypress Event)
I have designed a form with several textboxes. the user has to be able to switch to the next textbox (according taborder) by pressing both TAB and ENTER. TAB is no problem (default) but to capture the ENTER -key I use the KeyPress event like this:
Code: If KeyAscii <> 13 Then Exit Sub SendKeys (vbTab)
This works but I the pc-speaker makes an anoying [u]sound 'tinggggg'.[/U}
Any ideas?
Thanks Patricktingggg
No New Line
Code: Open "log.txt" For Append As #1 Print #1, key Close #1 How can I avoid it writing to a new line in log.txt?
How To Make Usercontrol With Excel Chart?
hi If someone knows how to make a usercontrol (or an active X) with OLE excel chart? I know it's difficult, but if there any ways to make this... tell me.
Thanks a lot
David
Printing Invoice Type Reports In VB
Hi
I have written an order-processing system using VB for an interface and Access as the data store. I am now trying to construct invoices so that the system can print out invoices once orders have been placed, displaying the relevant customer, product information etc.
I'm not sure where to start, but know I've probably got to use a data report somehow, but I'm not sure exactly how to use them?
TIA
A Sub That Handles The Same Event For Multiple Objects
Is there a way to do this, for example, when you have a series of text boxes, and whenever anyone of them gets focus, it runs a counter. Is there a way to write
Private sub LostFocus() counter=counter+1
end sub
without having to write a
Private Sub Textx_LostFocus() counter=counter+1 End sub
For every object?
thanks
Send Mouse Wheel Event?
How do I send the mouse wheel events up/down to the current focused window like I would do with keybd_event or mouse_event ?
Regards,
Evan
Pull-Down Event On Menu?
I have a form with a normal set of menus at the top, created by the Menu Editor tool. My form responds to MouseMove events. It responds to them improperly when a menu item is pulled down.Is there any way to be notified when pull-down menus are pulled down?Dave StraayerVaratouch, Inc.
Retrieving Info From An Online File
Ello peoples I'm a student who is doing a major project and i was just wondering if there is anyway i can retrieve information from a text file that is stored online (at geocities or sumfing). (i am using VB6)
Thanks
Network Authentication Login
hello everyone, I am new here and have searched the forums for solution to my problem but can not seem to find it. I did find one but it's not a workable solution.
I am new to Visual Basic and still learning. I'm learning VB6 using SP 6. Now I am taken VB classes now but working on a home project to get my self more using to using VB and also learn other stuff the the classe doesnt cover.
The program that I am writing is going to access an MS database on a linux server (Samba) over the network. The folder is shared and only 1 user can access it (only 1 username). When I try to access the database on that file, VB is giving me an error stating that I do not have access to that file.
I know the username and password but does not know how or where to begin on passing the username and password to that network authentication dialog to log in the program in for access to that database.
If possible please direct me to where I can find out how to solve this issue, thanks in advance.
[SOLVED] Converting Number To Wording
I used to know how, but I lose these code. please someone help me...
Thank in advance
p.s. I mean function to convert "1520" to "ONE-THOUSAND AND FIVE HUNDRED TWENTY"
Double Appointments Delete
Hallo *,
i need a Code witch search my Appointment's in Outllok and list the double Items ready to delete? (maybe with Listview) Can anybody help me to create the syntax or to found the syntax
thx woerny
from würzburg
Playing Wavs And Buffering Wavs
Ok in my game i dont want to use direct x as i have no idea on how to use it but to use API commands instead
I need to buffer 2 wav files
and then be able to play them
and is it possible to play both sounds at the same time?
Users Logged In NT
Hi Guys,I would like to know whether it is possible to get all the users logged in the NT Network.If Possible please provide me with the code.This is very very urgent.I have tried with some API's but n vain.Thanxminnal
Web Browser Control! How To Click An Image.
i want to click a button on an html page that is in the form of a .gif image using a vb application.
i know how to click html buttons using this code
VB Code: WebBrowser1.Document.All.Item("continueButton").Click
but not sure how to do a .gif
Getting Row From CSV File?
Is there a way to retrieve the row number from accessing a CSV file? below is the snippit of the coding im using to access the files:
Code: Dim DB As Database Dim RS As Recordset Dim StrSQL As String Dim ao As Currency Dim sa As Currency Dim ti As Integer Debug.Print "listitem stats started..." StrSQL = "SELECT Buyer, [Order ID] as orderID, [Sale Amount] AS Sale, [Artist Owed] AS Owed FROM buyers.csv WHERE item = '" + lsItem + "'"
Set DB = OpenDatabase("d:dataread", False, False, "Text;") Set RS = DB.OpenRecordset(StrSQL, dbOpenDynaset)
IR_Buyers.Clear IR_BuyersID.Clear Do While Not RS.EOF IR_Buyers.AddItem RS!Buyer IR_BuyersID.AddItem RS!OrderId ao = ao + RS!owed sa = sa + RS!Sale ti = ti + 1 RS.MoveNext Loop
RS.Close DB.Close
The OrderID proved not to be unique for each item, but a single number assigned to all items purchased in that order. I'm looking for a way to retrieve the row where the current item is so that I can do a query to get additional information from that record. Any ideas on how to go about getting the Row the item on?
VB And Folder Access On A Network
I have an VB application which should be able to access a document from a folder in the server. But this folder should not be accessed by the user when he goes via the Explorer. How can I have a an application used locally by a user have access to a folder, but not allow the user access through explorer.If there is another better area to ask this question, please let me know.Thanks,
Unload Form
I use many form and my principal form is Menu.When I use Unload Menu, my form close but 50 % of time my program continu to task in back...I use a lot of Data (Receordset) but I don't use the file (txt.. with open and close).Do you where is the problem?Sorry for my englishThanksRedg
Using Floodfill, Whats Wrong With This Code?
im trying to floodfill a picture box with a certain colour, ive used the floodfill command before and had it working. But for some reason i just cant get it working now. Heres my code can you please tell me what the problem is thx.
Quote:
Private Sub Command2_Click() FloodFill Picture1.hdc, 1, 1, vbRed End Sub
MS Access Select Query Criteria
Good morning everyone.
I am very new to Access and I am not impressed so far.
I have three variables in drop-down boxes called Lockbox, Date, and Batch.
These three items make up the necessary arguments for a Select Query off of a master table. This works well, but to populate the Batch fields I need to put in an Select Query in the Row Source to populate the Bath drop-down with Batch #s where the last 2 #s of the Lockbox equal the first 2 of the batch in the table.
This is my Select statement: SELECT DISTINCT tbl_GC100TestTable.[Batch Number], Left([Batch Number],2) AS LastTwo FROM tbl_GC100TestTable WHERE (((Left([Batch Number],2))=Right([Lockbox],2)));
This retrieves all the Batch Numbers (no duplicates), but doesn't filter out the Batch numbers that don't correspond to a specific Lockbox (ie. LB: 123456 B: 56001, LB: 234565 B: 65001, etc.).
My thought are, when the form loads, the Batch query populates the Batch drop-down and when the Lockbox, and date change; the batch doesn't update according to those changes.
Any suggestions? Thank you, DAVE
Hey I Am Hanging Please Help On Grid
Hello to all genius,
i want to enhance the flexigrid , my main aim is to create a non-bound grid which just acts as a excell sheet .,in which i want to set headings to columns and some properties like colwidth etc . to the columns .
can you just give solution which should be similar to a dbgrid but not bounded
please i am trying this long time and not able to get it
plz help
Extracting File Properties
Hello there,
I am using VB 6.0 to extract file properties from office applications and other file types. Like for exmple I can extract word count, number of pages from word and statistics for excel file. I am using word object and exxel object in order to get this properties.
Now my question, Is there a way wherein I can extract this properties without using these objects? I am able to get the GENERAL properties only without thye object but I need alse to get the Othere properties like when you right click the file itsellf you can see other tabs wherein there is some usable information stored..
Please help..
Thanks!
IANIAN
VSS/ Shell Application
I’m trying to work out a few things about Visual SourceSafe and one of them is this. If I want to send a shell application, after bringing it to a stable state (after having developed the shell app.), to a team at another location for final development do I create a separate Visual SourceSafe database and then ship the database file to the other location? Or, do I use the Pack. & Deployment Wizard from within SourceSafe to create a master copy when I’m done and ship that to the other location? Or do I do something else?
Can you help?
Call Windows Explore Or My Computer
how can I call windows explore or my computer from just pushing a command button in my program.. pushing this button would be the same as double clicking on "my computer" on the desktop
thanks Garrett
How Do I Read A Text File And Insert Into Access Database
Hi,Can anybody help me with the subject above.Tks
Accessing A Variable Name By A Variable
I know you can call a function by name or by it's name in a variable. My question is can that also be done for named variables or Const's?
To illustrate
I have the following data strings in my code:
Private Const s1 = "some text here" Private Const s2 = "some text here" Private Const s3 = "some text here" Private Const s4 = "some text here" etc etc Private Const s356 = "some text here"
I cannot put the data in an array. That is out of the question. I can only put the data in a series of Const's like shown above.
I need some way, if possible, to access the data from each Const without having to explicitly namming each Const. Something like this
For q = 1 to 356 MyDataString = MyDataString & "s" & q Next q
Now I know the above will put "s1", "s2", "s3",...."s356" in MyDataString but I need the actual data from these Const's.
Display Loftware Labels In Forms
good day to all you codegurus. i recently encountered a problem when a task was handed to me. we are using Loftware Labelling software here in our office to print barcode labels. i need to create a simple program to display and print .lwl files on my form. ".lwl" is the extension name of the labels created in Loftware. i have searched and search the internet on how to do this and i found the activex of Loftware, but it only allows the printing of the labels not the displaying side. does anyone know how to do this? i would really appreciate it. thanks and have a good day.
Asynchronous Processing
I need to kick off a program from inside my VB application. However, when I use SHELL, it seems that the application freezes until the shelled app finishes.
Is this the case? If not, then it would appear that the shelled app is hogging the system resources. Can I downgrade the system hog some way?
Testing File Associations?
hi
i have modified some file association code found on this forum so that when i dbl_click a file it will open in my program.
my question is do i have to compile the program before i can see if this works? i ask because at the moment the file does not look as though it has been associated and dbl_clicking on it brings up the box 'cant find the file..' which i assume is obvious since the actual.exe is not there...
so can i test this another way to make sure it definitely works?
Make A Text Box Have Word Wrap
Is there a way to make text boxes word wrap by themselves?
Code Speed - Which Functions Are Faster?
Howdy All,
I'm working on a project where I have to process millions of records at a time, so I'm looking to squeeze very last ounce of speed I can get out of it. Even small fractions of a second will add up. I've seen other kind of general function speed discussions here, but I'm wondering if anybody knows for sure which of several functions are faster for various comparison operations. For instance, which of these is faster?
VB Code: If sAccntNum = "" Then or If Len(sAccntNum) = 0 Then or If LenB(sAccntNum) = 0 Then
Or for that matter, is there any speed difference between these two? And if so, why?
VB Code: If sAccntNum = "" Then and If sAccntNum <> "" Then
One of the things I'll have to do is check for an account number with an "A" in it (only numeric is valid). So which of these is faster?
VB Code: If IsNumeric(sAccntNum) = False Then or If Instr(1, sAccntNum, "A") > 0 Then
I'll also have to deal with NULLs. So how about these two?
VB Code: sAccntNum = Trim$(vSource & "") or If IsNull(vSource) = False Then sAccntNum = Trim$(vSource)
Any issues and/or better ways to use things like Trim$, UCase$ and Instr, etc. would be very helpful.
Thanks for your help, -JoeyCode
Is It Possible To Display An Amperstand & In A Label?
I know that the amperstand is used as the underline symbol for hot keys. but i need to use an Amperstand to help main words in title stand out. Any ideas? Otherwise i think i'm going to have to find a picture file.
Thanks!
Mapi
------BEGIN OF CODE--------------- MAPISess.LogonUI = True MAPISess.DownLoadMail = False MAPISess.SignOn MAPIMess.SessionID = MAPISess.SessionID
'Open and Read Sequential File Containing File Name and E Mail Address(Created By another Program) Open "C: emp emp.abc" For Input As #1 Do While Not EOF(1) Input #1, file1,file2,email_addr,file_path 'Clear Send Buffer MAPIMess.Compose MAPIMess.MsgIndex = -1 'Define Recipients Address MAPIMess.RecipIndex = 0 MAPIMess.RecipAddress = email_addr MAPIMess.RecipType = 1
'Define Attachmanents (Data File) MAPIMess.AttachmentIndex = 0 MAPIMess.AttachmentName = Trim(file1) MAPIMess.AttachmentPathName = file_path MAPIMess.AttachmentType = mapData
MAPIMess.AttachmentIndex = 1 MAPIMess.AttachmentName = file2 MAPIMess.AttachmentPathName = file_path MAPIMess.AttachmentType = mapData 'Define Subject MAPIMess.MsgSubject = "some subject" MAPIMess.MsgNoteText = " " 'Send Message MAPIMess.Send End If Loop Close #1 MAPISess.SignOff Unload Me End
---------END OF CODE--------------
When I execute above procedure following thing happens. If there are 100 lines in the sequential file containing 100 email addresses and attachment files, only one or two messages are completely sent remaining messages simply sit in outbox. I have to open outlook express and click on 'Send/Receive' button to send them. Please guide me how can I send all the messages through code.
New To VB (Icon Question)
I need to know how to create the icon to be displayed when creating the .exe file.
Sending Shape To Back During Run Time?!
In my program, when an option button is clicked, a shape is drawn and a lable goes ontop of it. When I desighn the form, I can set the label to transparent background, and all you see is the text and the shape behind it. In my code however, when I try to get the same effect, it doesn't show the text, no matter if I put the text on the from first, or after I draw the shape, all you see is the shape. I need help please, any would be great!
Returning A String
Ok here we go, i wasent gonna ask this but it looks like i have to. Its kinda hard to describe so i am gonna show you some coding. What i am doing is let me give you a easier explenation then the hard one
I am lets say validating something that's typed into a textbox, so when the text is entered it has to be a specific way. So i have a function called lets say
Private Function ValidName(fGet as String) as Boolean
so that basically means when i call that function i would call it like this from my command button
if ValidName(fget) = true then
so what i am saying is if the name is valid do the following. but the problem that i have now is the function that i have has to be like this
Private Function ValidType(fGet as String) as String
now i have to return a string. my question is how do i call that and so i will return the string ? sorry if i didnt explain it good enough. But i need this by tomorow, the assignment is due buy last class tomorow , couldnt buy the book yet so i have to ask you , sorry but i am buying the book in 2 days, getting my dam check finally . Thanks for the help.
MSChart Control
I want to display the datagrid(ie data pertaining to chart) along with the chart. I want to display the datagrid appended to the chart at the bottom in a form. And if possible allow the user to change the data so that the same will be reflected in the chart at runtime.How to do this ?Any early reply will be helpful.ThanksAnand
Excel Sheet With Macro Type Mismatch
Dear All, I open a sheet which actually has macro and also filename.xls and filename.xla Now when i say Msgbox excel.Application.Version 'it does it fine Msgbox excel.activesheet.name 'it works fine But when i say Set Oworksheet = excel.activesheet ' it gives me typemismatch error #13 also the same error for the following For Each sht In excel.ActiveWorkbook.Sheets ' gives error on this line MsgBox sht.Name Next sht
Any inputs? Thanks a lot
snehal
Resize Pictures With Antialias ??
I am looking for a way to resize pictures with some resize method, like Bi-Cubic or Bi-Linear (by the way, what does antialiasing mean?). It is nessesary to me because pictures look horrible when i zoomin or zoomout them in VB with PaintPicture method.
Does anybody have appropriate function or maybe another idea how to avoid this?
Calendar For Showing Only Mondays
Hi, How can i show a calendar on a VB form which allows users to select Momday's only?
Regards, Bharathram G
Which Is More Efficient
probably completly insignificant but which do you think is the faster method,
VB Code: If Not strtrack = vbNullString Then
or
VB Code: If strtrack <> vbNullString Then
Regsvr32!!!!!
I'm trying to register an add-in for VB using regsvr32... however it won'tr register!
No success message appears, but no error message appears either when I run regsvr32. The registry, however, has no trace of the dll I just registered!
I replaced my regsvr32.exe file, but the problem still persists.
My Windows is ME.
Any ideas?
Problem With Popmenu In Textbox
I need to create a popup menu for the text box, that is when you right click the textbox, submenus created from the menu editor should appear. the problem is when I right click the textbox the first popup menu that appears is that which has copy, paste,....select all, and not the one that I created. It only appears after I right-click again for the second time.
please help
Form Capture Problem
I tried many examples of Form Capturing in this forum. But seen that it captures only the viewable portion of the form, and not the portion which is not displaying on the computer screen or which behind the other window. Is there any way to capture all containt of window irrespective whether it displaying on screen or not.
Using Existing C Source Code To Communicate Via Serial Port
Hello,
I'm not sure if this is the right forum to ask this question. The question is, I have a source code in C for communicating via serial port using proprietary protocol. I'm thinking about using Visual Basic to introduce a better user interface with the text boxes, buttons, and all that. So that the user can fill all the necessary info in the textboxes, then just click 'send' button to send all the info via serial port. What is the best way to do this so that I don't have to convert my existing C source code protocol to basic? is it even possible at all? will appreciate any advice.
kind regards,
gppman
Register An OCX
I have downloaded an ActiveX ocx and I want to use it in my VB project. How do do that? Do I need to register that ocx in the registery ? If yes, how to do the same.
Mathematical Formulas In A Database
I am trying to write a generic program using VB 6.0 that retrieves & evaluates formulas from an Access database. The problem that I am running into is that the formula is being read as a string instead of being evaluated as a formula. In particular, in one entry in my database I have the formulas rsRecordset("Charge")*rsRecordset("NumOfMinutes"). The formula is not being calculated and instead is being read in as a string. Any suggestions?
Thanks
VB6, Access 2000, Windows XP
I have an application written in VB6 which ran fine under Access 2000, Windows 98 and Windows ME. When I try to run it under Windows XP I get a Run-time error 3170 Couldn't find installable ISAM on the datComp.Refresh command. Also, I do not have Access 2000 on this particular machine, but Access 2002. The Access 2002 opens the Access 2000 database and retains its format. Therefore, I suspect the message is related to the OS. When I looked for the MDAC to download for Windows XP the entry said it was installed with the operating system. How can I resolve this problem? Does this have something to do with the VB6 installation, or Access, or the OS, or a combination? Any help you can give me would be appreciated. (By the way it does run as an installed executable program.)
Error Late-binding Creating Acrobat "AcroExch.PDDoc" (registrated Acrobat Prof 8.0)
Hi all,
Something strange happens to my code (it used to work correctly in the past).
When executing next sample code (with late-binding)
Code: Dim ac_App As Object Dim ac_PDDoc As Object
Set ac_App = CreateObject("AcroExch.App") Set ac_PDDoc = CreateObject("AcroExch.PDDoc")
ac_PDDoc.Open "c: emp.pdf"
I get error message:
Quote:
Run-time error '-2147024875 (80070015)' Automation error
When an instance of Acrobat Pro 8 is running, I can create with late-binding the "AcroExch.AVDoc" and "AcroExch.App". But no PDDoc. I've looked in the registry, and this looks like the attachment. Can anyone please help me. It's driving me nuts!
Thanks in advance!
DoLo p
List And Search Files In A Folder
Hi all, now i need to open a folder and search for some files have the same extention name, lastly list all the file names.
Eg: the folder contains different kind of files, some files' names are "xxxx.0D9", some files' names are "xxxx.0D3"....etc, so now i need to open the folder and find out all the files named with extention ".0D3" and show the file names out in a textbox.
Could you tell me is there any build in function to open a folder ? (let's say the path of the folder is "C:Documents and SettingsDesktopSample") or any suggestion? Thank you in avdance !
Drivers???
anybody used virtual cd, cd space, or fake cd. can anyone tell me how to load a certain file or dir as if its being loaded from a "fake cdrom drive", like the above mentioned programs.
PCI Library
Hi, anyone know some library to send data a PCI port, and also have a PCI Slot pins names. ???
Thanks !!
PHP From VB Activex Control
Hi There. I am trying to find out how to do some really simple calling of php scripts from my activex control. I want to call a php script a bit like this: http://somesite.com/somescript.php?value=xyz and then get the result back into a variable or variables. Is there a tutorial for this simple task or can someone point me in a direction.
Many thanks
Menu Shortcut?
I am still relatively new to VB and I have a question regarding Menus.
Currently, I am working on an application that has about 20 Forms and I want to use the same Menu for each Form. I've done about three and have realized that this will set me at least a week back on my project because it is a fairly detailed Menu.
Please tell me there's an easy way to use the same Menu in every form without manually entering everything!
How To Read And Write To File....Urgent
Hi, Kindly can anybody have a solution for this.... I have a file. I need to make changes in some places of the file and write to the same file using file system object...
Example...
# That is how it is called from the "run_all" script. # # When developing a test, you may specify the test here so that # you can just type "make" or "make run". The value can still # be set (overridden) from the command line. So go ahead and # change it as necessary.
TEST = csu02_03_05_t0001
In the above file the name after "TEST = "will be changing according to user inputs.I will have similar updations in the file. The keyword TEST will remain constant. I need to read upto TEST = and update the necessary file name in the same file.
Can't We Run The VB Application With Out Installing Oracle In The Client System
hi,
i created setup for my application and configured in all client machines ... but when i want run that exe in client sys then iam getting of oracle error. it means...i need to install oracle also in all my client machines. is there any way without installing the oracle, my application has to be executed .... i used adodb in my application and created connection to oracle database to get data.......
thank u rojasree.
Delete A File
when the user clicks on a command button, the program deletes a certain file? --Ant--------------------------------------------------check out my newest freewareE-mail me at: cgeorge@thevortex.comfor the address
Getting Device Info
hi
can anyone tell me anything on retriving device information..in my application i want to retrive which sound card is installed on the system and what type of speakers are being used..and check if i can test my audio output device (speaker) to play a sound if soud card is detected on my system.
__________________ VB leaves me weeping all the time...everytime...
Ascii Codes
Are there ASCII numbers for Ctrl, Alt, and Delete? If not, is there anyway to tell when one of them is pushed?
Thanks
THE Intermediate Window
Can memory be increased to allow the Intermediate Window to retain MORE text? thanks,JR
Zip Program.
I want to make a zip program that can zip and unzip zip files. Where do I start?
How To Change DB Path?
how can i change my DB path without changin the code? any1 know the way pls tell me..
Program Not Terminating Properly
When my VB program ends it leaves something running. If I run the program three times then press CTRL, ALT, DEL I can see three "remnants" of my code still running. Any thoughts?
Hooking And Subclassing
What is Hooking and Subclassing, i read alot about people using it on the forum, but i am not sure what it is.
Convert Decimal # To Another Number System
Use this to convert from decimal to another number system!!
Function DecodeValue(Base As Integer, ByVal dblCount As Double) Dim i As Integer Dim s As String Dim Digitarray() As Integer Dim Dividend As Double Dim Quotient As Double Dim Remainder As Double Dim Divisor As Double 'Debug.Assert dblCount <> 255 i = 0
Dividend = dblCount Divisor = Base Do ReDim Preserve Digitarray(i)
Quotient = Int(Dividend / Divisor) If Quotient = 0 Then Remainder = Divisor - (Divisor - Dividend) Else Remainder = Dividend Mod Divisor End If Digitarray(i) = Remainder i = i + 1 Dividend = Quotient Loop While Dividend > 0 DecodeValue = Digitarray
End Function
'Use the following to convert from Decimal to binary ' s = DecodeValue(2, 63) ' ' For i = 0 To UBound(s) ' out = s(i) & out ' Next
Dynamic Forms
I'm working on a system that is receiving status or change of state messages constantly from scores of devices. These messages can be grouped into perhaps a dozen different form types. How can I dynamically create a specific form type and display it in a master window, sorted by order of priority and post time, as each message is received. Thanks.Dan
Execute Macro To Run Automatically
Hi, I have created a macro that i want to automatically execute everyday. But for some reason when i run the below code to execute that macro it does not work. My macro name is imanimport. What i want is to open a excel spread sheet and run that macro that would create my output file. Please help???? Dim XL As ObjectSet XL = CreateObject("excel.Application")With XL.ApplicationXL.Visible = TrueXL.Run "imanimport"XL.QuitEnd WithSet XL = Nothing
How To Search An Ms Access 2000 Database
Hello,
This is my First Post! Be nice.
I resently created my first vb 6.0 project in which i used an ADO control to display an Access 2000 database Recordset. I set up the database with three tables (Amtra, Unio, Othe) and in each table are the fields named: FirstName, LastName, ID, DateEntered, Employee
I would like to learn how to search the table. I set up a new form with a combo box (Combo1) so the user can choose the Table used. Then I have a text box (TxtLastName) for the user to enter the lastname of the recordset. I want to code a command button (CmdSearch) to search the table selected, find the recordset with the Last name and then return the recordset Field entrys in 5 text boxes. (TxtFirst, TxtLast, TxtID, TxtDate, TxtEmployee)
I don't know where to begin, I would like to use ADO to bind the database to the 5 text boxes, Because that's what I learned last. Can anyone help me?
thanks... Markisces
Arrays In VB
How do I make an array that for instance "string" has value 4 and "string2" has value 6 etc? How do I retrieve the values? Thanks!!!
Way To Allow Mouse Scroller To Work?
Is there a way to let my users use their scrolls on their mouse (if they have a scroll mouse) to do things in my program, like zoom or something? How would I let them use their mouse scroll?
Simple FSO / Network Calculation
hello, I have developed a file uplaod system, I am trying to calcualte how long it will take to upload a selected file, i am doing this by getting the file size of the seleced file > converting the bytes to bits > then dividing by the network speed (100). My code below gives a "divide by zero" error..
ive prbaly got the calc wrong, any1 know?
thanks.
VB Code: Dim cFileBytes As Integer Dim cFileBits As Integer Dim cNetowrkSpeed As Integer Dim cResult As Integer netWorkSpeed = 100 lstDrag.Clear lstDrag.AddItem Data.Files(1) cFile = Data.Files(1) strFile = fso.GetFileName(cFile) cFileBytes = fso.GetFile(cFile).Size lblFileSize.Caption = cFileBytes & " " & "Bytes" cFileBits = cFileBytes * 8 cResult = cFileBits / cNetworkSpeed lblUploadTime.Caption = cResult
Run Animated Gifs In Toolbar ????
How can I/can I run animated gifs inside a (ms Common) toolbar ?????
Changing Font Styles When Sending Values To Text File
I'm not sure if this is possible, and probably not but can you change the font style when sending values to a text file using the print command?
like:
print #1, [ bold ] "blah blah" [/ bold ]
thanks
Hostent
In a nutshell I have the following code to parse the result of a DNS query: VB Code: CopyMemory udtHost, ByVal m_udtResolveTable(lngIndex).lngMemoryPointer, LenB(udtHost) CopyMemory lngPointerToIP, ByVal udtHost.lngAddrressList, 4 CopyMemory barIP(0), ByVal lngPointerToIP, 4 CopyMemory lngRemoteHostAddress, ByVal lngPointerToIP, 4 m_udtResolveTable(lngIndex).strAddress = barIP(0) & "." & barIP(1) & "." & barIP(2) & "." & barIP(3)
What if the domain has multiple A records? Like google.com for example, how to I get them from the result? Want to make strAddressList() all the A records.
Visual Basic Regestry Modifying
********************************** Moderator note: Illegal request
**********************************
Hi i was wondering if anyone could tell me how to change registry in a touch of a button in visual basic 6.0 because i found out on how to make my visual basic working model edition into a enterprize version now i want to give the registry to my friends but i want to make it into a executable sort of like a crack so can anyone help me?
Thanks
How To Read Text
How to read text in a text box, letter by letter?
Access Violation
I wrote a visual basic code in excel 5 and since we have converted to excel 7 here at work every time I try to execute it I get the following Dr. Watson error code:Access Violation 0xc000005address 0x6534231aThe code is a simple if statement loop. See below:Sub Bridge_units() If Range("b12") = 1 Then Range("c13") = "kg" Range("c14") = "kg" Range("c18") = "mm" Range("c19") = "m/min" Else Range("c13") = "lbs" Range("c14") = "lbs" Range("c18") = "inches" Range("c19") = "fpm" End IfEnd SubI have various loops like this througout the spreadsheet.
SSTab And Displaying Calculation Results
As part of a bigger project, I am using SSTab. I have three tabs. The first tab the user enters the data, The second tab will display the result of one calculation, the third tab displays another result. I understand how to move from one tab to the other using the tab key, but what I cannot seem to sort is the display of the results on the other tabs. I attach a short piece of coding and form which I have put together to help me understand how to get the program to work, but I cannot see why the results of the calcs will not display on the other tabs. Anyone tell me what I am doing wrong? Thanks
VBA
How do i write a macro for a button which is dynamically created in the WORD Document???
Change Date Format
Hi guys, I want to convert a string representing a date in any format (mm/dd/yyyy or dd/mm/yyyy) format to the system date format. I have searched through a lot of thing but ....(:
SendKeys Not Working In Windows XP?
Hello,
Am I the only one that has trouble with SendKeys? The simple code below won't even compile, giving me the following error message:
"Expected variable or procedure, not project"
I've searched high and low almost all VB-related discussion lists, and the result is zip! The statement works fine if I am sending the keys to a control within the form. Yet it refuses to work on any other window, invoqued by the Shell command. Please help!
Windows XP 2002, Professional Version, SP 1 VB6
________________________________________ Private Sub Command1_Click()
Dim ReturnValue, I ReturnValue = Shell("CALC.EXE", 1) ' Run Calculator. AppActivate ReturnValue ' Activate the Calculator. For I = 1 To 100 ' Set up counting loop. ' the error happens here SendKeys I & "{+}", True ' Send keystrokes to Calculator Next I ' to add each value of I. SendKeys "=", True ' Get grand total. 'SendKeys "%{F4}", True ' Send ALT+F4 to close Calculator
End Sub
Webbrowser Problem/limitation?
I came across an issue, while trying to build a application to submit news to a website i noticed that the the url wasn't beeing totaly processed , i'm using $_GET vars (php). I can use post too but i don't know how to do such with webbrowser control. I think that the main problem is the huge size of the url that contains the query, it can be easely be more then 300 chars since i'm submiting text. Is there any way to workarround this?
VB Datagrid To Pull Access File.
I'm trying to make a Flexgrid program that will enable me to press a command button to go to the next table in an Access file. Every time the com2 button is pressed - then Cate = Cate+ 1 (Cate being the table number(1-13 in this case) viewed by the user Tabl(1-Cate) is the name of that Table. For example: Tabl(1)="Bills"
Here's the program so far:
Option Explicit ' Note: 'Dim' will work the same as 'Private' here ... Private Cate As Integer Private Tabl() As String
Private Sub Form_Load()
Dim db As Database Dim td As TableDef Dim intX As Integer
Set db = OpenDatabase("C:My Documentsphone numbers.mdb") For Each td In db.TableDefs ' There are hidden, system tables in an Access DB ' that start with "MSys", which you want to ignore If Left$(td.Name, 4) <> "MSys" Then intX = intX + 1 ReDim Preserve Tabl(1 To intX) Tabl(intX) = td.Name End If Next db.Close
Cate = 1 dbPhone.RecordSource = "SELECT * FROM " & Tabl(1) End Sub
Private Sub com2_Click() Cate = Cate + 1 If Cate > UBound(Tabl) Then intCate = 1 dbPhone.RecordSource = "SELECT * FROM " & Tabl(Cate) dbPhone.Refresh End Sub
**** Now my question is: When I run this program - I get an error message: ** The Microsoft Jet database engine could not find the object "SELECT * FROM Bills." Make sure the object exists and that you spell its name and the path name correctly.
Now when I pull up the Access file (phone1.mdb) the first table is Bills. The first column is Bills/Phone Number/Address/Account Number/Notes What I think the reason for the error is the fact that it is searching for "MSys" Does anybody else have any other ideas: For a more fuller explanations look up web page: http://forums.vb-world.net/showthrea...9328#post89328
Textbox Is Editable??
hi folks, When i put a text using textbox onto a form and when i display the form, i noticed that i can actually put my cursor on that text and edit it! How can i prevent such a thing from happening? Please advice.
regards
Using A Custom Mouse Icon? (I'm Sure This Is Right)
Hi,
I have created my own little mouse icon 32x32 and saved is with the *.ico format. I would like the icon to appear on a picture box call picMain so I set the picture's MousePointer property to 99 - Custom and I selected the icon that I created in the MouseIcon property. For some reason I'm still getting the default mouse icon when I move the mouse over the picture box. I've done this many times before but for some strange reason its not working anymore. Does anybody have any ideas?
Thanks
Crystal Reports 7.0 (ODBC Connection)
I am using Crystal Reports and VB with Access as my database. I create a ODBC connection in the control panel and point to the ODBC connection when I created the report in the design mode. everything works fine until I go to another machine with the same ODBC connection but everything is sitting in a different path. For some reason the report loses the ODBC connection. and I have to open it back up and reset the connection.
I thought the purpose of the ODBC connection is to find the database no matter where it is located as long as the ODBC System DSN Name is the same as the one set in the crystal report. Please correct me if I am wrong. or am I suppose to set something up in the VB app?
If anyone has a fix for this I would greatly appreciate it.
Manual Scanner.....
hi.
does anyone know where can i find information about how a manual scanner works?. i need to know how to paste images and how to identify where to paste images to make only one. i will work in visual basic.
thanx
Opened Exclusively???
i got an error message that said
Quote:
the microsoft jet database engine cannot open the file '\serverdb1.mdb'. it is already opened exclusively by another user, or u need permission to view its data.
why this error comes up?
and also when i try to connect through Windows Explorer, it said
Quote:
no more connection can be made to this computer at this time because there are already as many as connections as the computer can accept
why this happen too???
thx
Why 'Invalid Qualifier' ?
Here's a strange one.
I have a function that (is supposed to) return an array of a user defined Type.
The problem is that I get "Invalid qualifier" error at run time and it wont even let me choose my items from my private Type when I'm typing the code.
If I change it to return just one instance of the Private Type instead of an array it works but I need an array.
Here's some example code (this is in a module):
Code: Public Type tOne sub1 As String sub2 As String End Type
Public Type tMain sName As String mySubs As tOne End Type
Public Function Hello(ByVal a As String) As tMain() ' <-- If I remove the paranthesis it works, but I need the array
ReDim Hello(0)
Hello(0).mySubs.sub1 'Error! Invalid qualifier hello(0).mySubs. '<-- It wont even let me choose 'sub1' or 'sub2' when typing.
End Function How can I make it work? I need a function that returns an array of the 'tMain' Type.
Status Bar Related Query
How to insert Progress Bar in Status Bar in VB 6.
Easy , Adding Strings..
Hi.. may I know how to add two string in VB.. in C++, I do
Code:
CString str1,str2, str; str1 = "c:\myfolder" ; str2 = "pagecount.txt"; str = str1+ "\" + str2; ofstring file; file.open(str);
in VB I wrote,
Code:
Dim fileName As String fileName = frmPrinterProperties.IDpath.Text & "pagecount.txt" IDprefix.Text = fileName Open fileName For Output As iFileNum ' opening file.. pagecount.txt
but only "pagecount.txt" shows and I can't open the file.. how to fix that?
thank you
How To Show Any Text
What i am trying to do is find out what empty text is like whatever i type in the txt box it will add it to a box. ive tried
txtname.text = ""
txtname.text = "."
im not sure can anybody tell me
A Compiler In My Application
Hi to all... I want to put in my application a "vb compiler" so when I run my application, I can write down VB code and then my program will compile it...
any suggestion?
thanks
Any Way To Remotely Reset NT 4 Workstation's Over A Network?
We have a PC bank here and we need a new way to reset them remotely from another machine. Is this possible in VB?
Running Minimized
I have a program which uses the serial port to do messaging via a cell phone and needs to make updates at intervals specified by the user. The program checks the system time against the 'next update' time calculated when the interval is set. After an update this time is recalculated. I am using a timer which times out every 30 seconds to check the system time. All this works fine when the program is not minimized. When it is minimized, it only works some of the time. This is confusing me as I expected that the timer event would generate an interrupt which would keep the program going. If the timer did not run while minimized I would expect it to never work when minimized.
Is there something I missed here, or is there an easier/better way to do this?
Regards, Andy
DirectDraw
I just switched the rendering mode from BitBlt to DirectDraw for my tile engine, but now it flickers quite badly when the map is scrolled. Can anybody help me please? I'm really new at all this DirectX programming. Also, I tried using a backbuffer... it didn't work... Still flickers... This is the code to create graphics to a picturebox ==>
Private Sub DrawSurface() Dim Dest As Rectangle Try BackSurface.ColorFill(Color.Blue) BackSurface.DrawFast(0, 0, MapSurface, Map.Rect, DrawFastFlags.Wait) Catch ex As SurfaceLostException InitializeSurface() End Try
Dest = New Rectangle(PointToScreen(Me.picMain.Location), Me.picMain.Size) FrontSurface.Draw(Dest, BackSurface, DrawFlags.DoNotWait) End Sub
Damn ComboBoxes
I have a problem. I have a combobox that a user can choose a percentage from it for the Zoom. Well, when you choose a percentage from it, it places it as a decimal. This is in VBA mind you. I have set the format in the control source and the row source to Percentage with out any decimal points and its still showing a decimal when you select one. How can I fix that? Also how could I write some code so if the user chose 95% zoom it would show the form to be at 95%. This is on a user form.
Only Unknowns Get Added To My Report Listview.
hey guys I have a listview called report that get items added to it when items in my list6 are clicked.
Now items go in list6 with the code here.
VB Code: lvwFound2.ListItems.ClearList1.ClearList6.ClearDim X As LongDim Y As Long'Dim intI As IntegerDim FindStr As StringDim i As Long Dim SearchPath As String Dim FileSize As Long Dim NumFiles As Long, NumDirs As Long Dim strParts() As String Dim lngIndex As Long Dim lngReturn As Long Dim strToFind As String Dim lngListIndex As Long'Dim strFT() As String'Dim FindStr As String'strFT = Split(Text2.Text, ",")'For intI = LBound(strFT) To UBound(strFT) ' FindStr = strFT(intI) ' FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs) 'Dim strFT() As String'strFT = Split(Text2.Text, ",")'For intI = LBound(strFT) To UBound(strFT) ' FindStr = strFT(intI) ' FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs)'scan.Showscan.Timer1.Enabled = Truescan.Label6.Caption = ".exe"Timer2.Enabled = TrueIf Text16.Text = "ON" ThenAttention.ShowAttention.Label1.Caption = "Autoscan is already engaged, you must turn off autoscan before running a single scan."Else: DoEvents Label19.Caption = "Scanning in progress... Please Wait." Text10.Text = Text10.Text & vbNewLine & "Scanning in progress...Please Wait.." 'Label7.Caption = "Last antivirus/process scan was at: " & Format(Now, "DD MMM YYYY hh:mm:ss") TerminateEXE Text2.Text If Text2.Text = "" Then Exit Sub End If For i = 0 To List1.ListCount - 1' put in your search here using List1.List(i) Next 'Text2.Text = "*.*" 'Screen.MousePointer = vbHourglass 'StatusBar1.Panels(1).Text = Label16.Caption List1.Clear SearchPath = Text1.Text FindStr = Text2.Text FileSize = FindFilesAPI(SearchPath, FindStr, NumFiles, NumDirs) ' StatusBar1.Panels(1).Text = Me.lvwFound.ListItems.Count & " Problems found." ' split' Dim xxx As String' lvwFound.ListItems.Add , , "what?" ' strParts = Split(xxx, "")' lvwFound.ListItems(1).SubItems(1) = strParts(UBound(strParts))' List5.AddItem = strParts(UBound(strParts)) ListFiles "C: emp", "*.txt" ' For i = 1 To 10 ' List1.AddItem "2"'NextDim ixi As Long'For ixi = 0 To List1.ListCount - 1 'If List1.List(i) Like "Update" Then List1.RemoveItem (ixi) 'Next ' All matching elements are removed. In this case, the list is cleared. 'atching elements are removed. In this case, the list is cleared. For lngIndex = 0 To List1.ListCount - 1 lvwFound2.ListItems.Add , , CStr(lngIndex + 1) strParts = Split(List1.List(lngIndex), "") lvwFound2.ListItems(lngIndex + 1).SubItems(1) = strParts(UBound(strParts)) Next For intI = 1 To lvwFound2.ListItems.Count strToFind = lvwFound2.ListItems(intI).SubItems(1) lngReturn = SendMessage(List2.hwnd, LB_FINDSTRINGEXACT, -1&, ByVal strToFind) If lngReturn >= 0 Then lngReturn = SendMessage(List6.hwnd, LB_FINDSTRINGEXACT, -1&, ByVal strToFind) If lngReturn = LB_ERR Then List6.AddItem strToFind Call LoadReportListview End If End If Next intI lngListIndex = SendMessage(List6.hwnd, LB_FINDSTRINGEXACT, -1, ByVal "NeroCheck.exe") If lngListIndex > -1 Then List6.RemoveItem lngListIndex End If ' add search resutlsinto lvwfoudn' lvwFound.ListItems.Count 1, , Me.List1.List(0), 0, 0' Me.lvwFound.ListItems.Add Me.lvwFound.ListItems.Count + 1, , Me.List1.List(3), 0, 0 ' labListCount.Caption = "Number of Detected Files Found: " & CStr(List6.ListCount) 'Text10.Text = Text10.Text & vbNewLine & "Scanning Complete, Results are below" ' Text10.Text = Text10.Text & vbNewLine & labListCount.Caption ' Label16.Caption = Text3.Text' List1.Clear lvwFound2.ListItems.Clear ''''' do it again+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+
And the subs I call are here.
Private Sub loadreport()
Dim itmXi As ListItem Set itmXi = Report.ListItems.Add(, , Label15.Caption) itmXi.SubItems(1) = Label34.Caption itmXi.SubItems(2) = Label26.Caption itmXi.SubItems(3) = Label32.Caption itmXi.SubItems(4) = Label36.Caption End Sub
and
VB Code: Private Sub LoadReportListview()'Label26.Visible = FalseDim con As ADODB.ConnectionDim rs As ADODB.RecordsetDim strSQL As StringDim strCol As StringSet rs = New ADODB.Recordset'Set con = ADODB.ConnectionSet con = New ADODB.Connectioncon.CursorLocation = adUseClient con.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "DatabaseMain12.mdb;" & "Jet OLEDB:Database Password=omegacron2;"strSQL = "Select NameOfItem, TypeofFile, Severity, Description From Table1 " & _"Where (VirusList = '" & Label15.Caption & "')"rs.Open strSQL, con, adOpenStatic, adLockOptimistic' then when your rs returns...If rs.EOF = True Then ' might also be able to check if rs.RecordCount=0 Label34.Caption = "Unknown" Label32.Caption = "Unknown" Else ' note: use of & vbNullString below prevents errors if a field is null rs.MoveFirst Label34.Caption = rs.Fields("NameOfItem") & vbNullString Label26.Caption = rs.Fields("TypeOfFile") & vbNullString Label36.Caption = rs.Fields("Description") & vbNullStringEnd Ifrs.CloseSet rs = Nothing If Label32.Caption = "" ThenLabel32.Caption = "Unknown"End If If Label15.Caption = "" ThenLabel15.Caption = "Unknown"End If If Label34.Caption = "" ThenLabel34.Caption = "Unknown"End If If Label36.Caption = "" ThenLabel36.Caption = "Unknown"End If If Label26.Caption = "" ThenLabel26.Caption = "Unknown"End If End Sub
But when the program runs and items get added to list6, only the word "unknown shows up in each of the report listview columsn.
Did I make some sort of big mistake?
thanks!
Integer But Not Double
Hello, I have following code
Code:
Dim i As Integer i = 3/2
from my knowleadge, if you set the variable as an integer, when you divide, (from the example) suppose to be i = 1 but right now i=2 because the answer i = 1.5 and automatically set the i to 2 . why is that? I don't want the decimal numbers, I want the integer. How can I fix that problem
Thanks
XP/API's & VB
I'm about to get a new comp and XP is majorly popular at the moment. The Problem: I've heard you can't use API's. Is there an alternative??
Trasferring Device Context From Printer To Picture Box -- Problem
I am redirecting output to the Printer Object using Code. Before the printing is scheduled I want to show the output as a preview in a Picture Box. Now I attempted to assign the device context of the Printer Object to the Picture Box using the BitBlt API but system was hanged.. I think this should really work.. Can u tell me why I am encountering this problem..Or is there any other solution to redirect the output as a print preview using a Picture Box Control.If u have any Ideas or suggesstion about this please let me knowU can reach me at math_robert99@hotmail.comRegardsRobert MathewsProgrammer AnalystZeus Software SolutionsINDIA
TextBox Problem
I have this code so that if the Text1 control has more than 50 characters, the vbBack will do the work.. If Len(Text1) > 50 Then SendKeys vbBack End If
But I try to paste a 50 characters, and when I paste a 50 characters again, then I dont know is happen already.. the TextBox doesn't stop already.. What's the best thing to do?
Very Fantastic Problem.
I have changed the timeout value,but the problem is still exist...
How To Make A Trial Version Of Software
I want to make a kind of 10 day trial of some software I am writing but have thought about the following:
Either I can permanently disable the main functionality so they can get a feel to what the program will do (but can someone hack into a .exe and amend)?
I can install the program and store the installation date and then wait for installation date + 10 days, but if the user keeps amending the system date,it will never expire.
I can install the program again, and store the install date and keep storing the date the program is accessed and when I get 10 unique dates, stop working.
Or I can just limit the usage of the program to 100 uses, incrementing each time the user enters, problem with this, it can expire after 1 day if he goes in 100 times.
Any thoughts appreciated.
Torrent Tracker Status?
Well here is what im trying to do.
I have a torrent tracker set up at: http://www.diablo3k.net/torrents
I want to write up an application where people who have seeded (or havent seeded) a .torrent file, can track its progress. View its downloaded/uploaded info, its comment, its file name everything.
Is there anyway to do this? Everything is stored in a mysql database on the server (not local) if that helps. Could i just some how import the information from the torrents description php page, and put it all in labels or in a text box? And then have it just reload every few seconds like a browser? How would i start this? Any help is greatly appreciated. Thanks VERY much in advance.
Automation Error Is A Mystery
Does anyone know what Automation error -2147221163(80040155) mean? I was trying to export data from an Access 97 database to a text file with the Docmd Macro command in my vb 6.0 application. How do I find the source of the problem? Thank you. Tony
INSERT Query In MS Access (DATE)
Fellow programmers,
I'm in serious trouble now and therefore asking your help. What's the point!
I've made a form on which students can be subscribed (added to an access database).
When I fill in all the fields, it all goes well except when there is missing one or more datefields! The database has the fields as Date/Time Small format, so for example 20-8-2003, and a standard value of NULL! The values in my visual basic prog are being transformed to date-format by the next example : CDate(Me.Text4.Text) This all works perfecto except, as being mentioned before, one or more datefields are not filled in.
Does access needs the values so badly or am I doing something wrong?
Here's the insert query for the interested ones....
[VB"INSERT INTO tblLeerling (" & _ "Achternaam,Voornaam,onderwijsvormID,besluitCVI_ID,besluitSchool_ID,me ldingIn)" & _ "VALUES('" & varAchternaam & " ','" & varVoornaam & "','" & varOnderwijsvormID & "','" & varBesluitCVI_ID & "','" & varBesluitSchool_ID & " ','" & CDate(Me.Label5.Caption) & "')"[/vb]
Can somebody out there please help me
Regards,
Richard The Netherlands
Save As And Cancel
I have a piece of code that shows the save as dialogbox. If a user chooses "cancel" a file named FALSE.xls is generated. I've tried to close the active workbook if the filename is "FALSE.xls". That did not work.
Sub checkFilename() 'check the filename. berekening_nw.xls is the original file. This macro must not run if the filename is different from the original.
bestandsnaam = Excel.ThisWorkbook.Name
If bestandsnaam = "berekening planning_nw.xls" Then sPath = Application.GetSaveAsFilename("nummer invullen" + ".xls", , , "Berekening opslaan") ThisWorkbook.SaveAs Filename:=sPath Else: Exit Sub End If
End Sub
Sum Duration
how can i get the sum of my duration while the data type is string.
sample data: "00:23:01" "00:67:12" "00:02:45"
how can i do this in a sigle query?
is it possible?
Formating Listbox
Hi guys i have a listbox at the moment with lines of text the lines vary a little in lengh and therefor the text is not aligned. the text i can split into strings at " " but how do i set the listbox to colums and what id the command for adding a string to a line in a colum i know list1.additem but i presume there is a different one for colums?
thanks
Licensing Problems With MsFlexgrid
Hi friends !I have a MS Access 2003 and an older (MSAccess2000) VBA application in which i used MS Flexgrid (The program is written by me ). Since MS Access is changed to 2003 the mdb works but when I open the form, where the flrxgrid id on it shows me a Magbox that there is no licence for using that control. Very strange as I have enterprise edition of visual studio for professional usage, fully registered version. So it should not do so. A time ago I had read about that problem and tht it is a bug, but I have forgot where and what to do against. Anyone knows about that ?
Access 2000 Record
Hello,
i'm in access 2000 vba, and i 've a problem to get all my record who come from a text file.In my text file, i've 48000 line, I must obtain 3000 recor diffrent.
Here's the structure of my text file:i've two record, and 16 lines by record.
Quote:
HSBC AM Actions Europe C
XFR
-23.432 -22.821 -24.552 33.003 -0.442 31.292
HSBC AM Actions Internat.
EUR
-26.413 -26.453 -30.883
Code: Private Sub Bascule0_Click() ' Code sur l'evenement click du bouton du firmulaire !
Dim TextLine ' déclaration des variables Dim Compteur ' Declaration du compteur qui vas permettre de definir la ligne Dim FichierImport As String ' Dans le formulaire allez sur un nouveau enregistrement 'TextLine = 48290 DoCmd.GoToRecord , , acNewRec FichierImport = "C:DevStudioVBs4.txt" 'C:DevStudioVBs4.txt
Open "C:DevStudioVBs4.txt" For Input As #1 ' Ouvre le fichier. Compteur = 1
Do While Not EOF(1) ' Effectue la boucle jusqu'à la fin du fichier. Line Input #1, TextLine ' Lit la ligne dans la variable. Debug.Print TextLine ' Affiche dans la fenêtre Exécution. If Compteur = 1 Then Me.Valeur = TextLine 'Si le compteur est sur la premiere ligne alors Remplir le champ If Compteur = 3 Then Me.Devise = TextLine '' If Compteur = 8 Then Me.dda = TextLine '" If Compteur = 9 Then Me.zdouze = TextLine '" If Compteur = 10 Then Me.d24 = TextLine '" If Compteur = 11 Then Me.q36 = TextLine '" If Compteur = 12 Then Me.s48 = TextLine '" If Compteur = 13 Then Me.h60 = TextLine '" If Compteur = 14 Then Me.s72 = TextLine '" If Compteur = 15 Then Me.d96 = TextLine '" If Compteur = 16 Then Me.cv = TextLine '" Compteur = Compteur + 1 Loop
Close #1 ' Ferme le fichier
End Sub
Form_Load Issue?
From.Show Form_Load Unload Me
Form.Show No Form_Load Execution this time Unload Me
If I have code in the form_load, it will be executed, however it will only be executed once. Meaning, if I unload the form, and have it show again, the form_load is not executed anymore. Is there another way to execute form_load again? Instead of adding timers to the other forms to be executed otherwise... I have been using this for the time being...
Zack
Shift Focus To Next Text Box When Enter Is Pressed
Hi Everyone. OK, what I need to do is enter data into a text box and when the user presses enter, change the focus to the next text box. I think there should be a simple way to do this, but haven't been able to make it work yet. Any ideas? Thanks, -Sweidman
Share
ok what i want to do is have a function that shares a folder -
ie:
Code: public function shareFolder("c:sharedfolder","sharename")....
so this would share "c:sharedfolder" with the name of "sharename" access restrictions would be good too but not required...
thanks in advance Kris Bennett
Need To Convert Vb6 Application To Use Hebrew Language, What To Do ?
hello,
i do have one application written in VB6 using Ms-Access. it's a large application having many user entry forms/dialog and reporting is done in excel. though i managed to make it work with different date format setting, it's not compatible with other RTL languages.
can somebody help to convert it in Hebrew ?
Any Suggestion / Links / Demos / Code snippets / Tutorials / White Paprers / How to guides will be highly appreciated.
thanks in advance,
Niraj sikotara.
Automatic Filling Form ,browsing Site And Saving Data
Hi !I am looking for a tool or help for writing a tool so that tool can open a site click on link "find" on that site so that "find page" comes up and then in text box for find write some number and cliks on "find" button, now site will generate all data that it found , this data should then be copied in a word file . and it keeps on doing for particular range of numbers.Thanks Naveen
Setfocus On An Element In An Html Page In Browser
How do I achieve to setfocus on an element in the web page of the page i'm currently browsing?
I tried: frmBrowser.brwWebBrowser.Document.body.All.Item("m_IV").SetFocus
but that dont work.
Thanks!Knowledge is the rule
Should A Combo Box Respond To KeyDown Events?
I've got a ComboBox set to the Dropdown List style.
The combo box has the focus when the form is loaded, so it has the Dark Blue Highlight.
I've got a Breakpoint set in the KeyDown handler, but It doesn't seem to be responding to KeyDown Events.
I've also tried the 2 other styles, but neither will make it respond to a keydown event.
I've also tried the Keypress, and it is not being called either.
I am pressing the keys 0,1,2,3,4,5,6,7,8,9, NOT the numeric keypad keys. Regardless, I've got the breakpoint set in the first line of the event handler.
Would someone explain why these handlers are not being called ?
thanks
Very Simple.... I Think
Hi there ...
this one should be easy... I'm trying to print a picture...
By now I already can make a print screen and save it in a file, what I cant still do is print the picture (centered in a A4 page) and later delete the bmp file...
Can you help me?
Many thanks..
SQL2000 And Excel 2000 VBA UDF
I currently have a database which I'm trying to connect Excel to to automatically fill in some work reports. I need the UDF to take in 3 variables - two of which are for the WHERE section of the SQL statement to match the result, the third is for selecting which field/column is req'd. The database and tablename are hardcoded. The database will only ever have one match for the two variables - i.e. only one ref with a particular date, so when I ask for a particular field to be returned there will only be a single answer (which could be a string, date, time or integer, depending on what I request).
It keeps returning #VALUE!
Code: Public Function ANITEDataExtract(d As String, f As String, r As String) As String
' Create a connection object. Dim cnPubs As ADODB.Connection Set cnPubs = New ADODB.Connection
' Provide the connection string. Dim strConn As String
'Use the SQL Server OLE DB Provider. strConn = "PROVIDER=SQLOLEDB;"
'Connect to the Pubs database on the local server. strConn = strConn & "DATA SOURCE=ops-serv;INITIAL CATALOG=ANITEFigures;"
'Use an integrated login. strConn = strConn & " INTEGRATED SECURITY=sspi;"
'Now open the connection. cnPubs.Open strConn
' Create a recordset object. Dim rsPubs As ADODB.Recordset Set rsPubs = New ADODB.Recordset Dim sqlStr As String sqlStr = "SELECT " & r & " FROM S04 WHERE Date='" & d & "' AND FltNum='" & f & "'"
With rsPubs ' Assign the Connection object. .ActiveConnection = cnPubs ' Extract the required records. .Open (sqlStr) ' Copy the records into cell A1 on Sheet1. ANITEDataExtract = Str(rsPubs) ' Tidy up .Close End With
cnPubs.Close Set rsPubs = Nothing Set cnPubs = Nothing
End Function Can anyone please help me solve this problem?
Eof
what is the equivalent for EOF using textboxes or variables? Example code:
Code: Private Sub doubble() x = 1 NewTxt = "" next1: vardouble = Mid$(MyVariable, x, 1)
If vardouble = "e" Then NewTxt = NewTxt & "ee" ElseIf vardouble = l Then NewTxt = NewTxt & "ll" ElseIf EOF(vardouble) Then 'This is the problem, currently I am using a special symbol GoTo end1 'but that sucks Else MsgBox "please only use e's and l's" Exit Sub End If x = x + 1 GoTo next1 end1: Text1.Text = NewTxt End Sub help?
Operation Must Use An Updatable Query
Ok. Here's the deal. I'm trying to make my datacombo box to attach to my ADODC, but whenever I try to go to a different record or update with the update method, it tells me "Operation must use an updatable query". WHY? Even if I don't bind the list to it and just the normal DataSource and DataField properties to it, it still says that. It doesn't make sense! WHY? And I am using the DataCombo of the component Microsoft DataList Controls 6.0 . If that's the wrong one which one should I be using?
Closing VB?
When I call the End command, VB crashes with my program! I'm trying to debug it and I have narrowed it down to the End command. What could cause this?
Dbgrid Column Width
Why does the Rollback method reset the column width to defaults? I would like to keep the user defined widths of columns...
Another Calendar Question?
I have a calendar that you can double click on a day and enter text in that day such as birthday’s, appointments or what ever. My problem is I cannot figure out a way to save it so it will be there the next time you open it? I can save it to the registry or a database but I cannot get it to show back up in the correct day and month only. I have tried so many dif things that I have about worn my keyboard out. The Calendar is a based on a array of text box's not a calendar control. I have removed all failed attempts at saving it and attached a copy of it. If any of you could take a look and point me in the correct direction I would be grateful. Tanks John.
"Be patient with me I am a little slow at times."
Print Dialog
I know how to print a text from a richtextbox. But how do 'I print it using the print dialog?
Thanks for your help.
Read Text File From Internet
Okay, this question will be easy:
I'd like to read txt file through internet.
My code is following:
Dim strTesti2 As String strTiedosto = "http://www.suomenpankki.fi/ohi/fin/0_new/0.1_valuuttak/fix-rec.txt" 'Avaa tiedoston Open strTiedosto For Input As #1 Do Until EOF(1) Line Input #1, strTesti2 txtTesti.Text = txtTesti.Text & strTesti2 & vbNewLine Loop 'Suljetaan tiedosto Close #1 GoTo Loppu Virhe: Loppu:
So what's wrong? If file is in my hard disk, it will work (of course). But I don't really know that how to use files through internet...
If somebody have working code, then please post it to here...
Thank U.
User Control Help- Choice In Property Box?
I've been doing VB for years now but have only just made my first user control... i just want to know 1 thing:
When it is used in a form, how can you get a property in the property box to give a choice of values, like "0 - Rectangle" or something. Sorry, i expect this is really simple but thanks for your help...
How Do I Detect User Plugging/Unplugging USB Drives
Hello All,
I have done a fair amount of VB and VBA but not a lot of API work. How do I detect when my user has plugged in/out a USB drive? Thanks for any ideas and/or suggestions!
Have a great day!
j2consulting@yahoo.com
Web Page And Vb Script
web page and vb scripting is new to me How do I set up a web page to use vb scripting and do I use my VB6 editor for it?
I know vb6 and vba well enough to understand the basics.
thank you for your time and have a good day
this is going to be put on a web page at http://webpages.charter.net/pali/
VBA Problem...
Hi, sorry, I`ve been posting this question in the Access forum and no one answers... so hopefully this is the right place to go. I am trying to add controls to my form dynamically when a button is clicked on my form. So far I`ve tried: 1. ctlONO = New Label ctlONO.ID = "Label1" Me.Controls.Add (ctlONO)2. Dim myLabel As Label Set myLabel = Me.Controls.Add _ ("Forms.Label.1", "lblPrompt")3. Set ctlONO = CreateControl("納期日", acLabel, acDetail, , strONO, ONO.Left, 250) all to no avail... I am using Access 2000 and it says it cannot find an add function for the first two and the third attempI get an error that I don`t understand at all.. Can anyone help me? Danny
Breaking A String At A Space
I am reading a line from a text file (actually quite a few lines) each line is structured the same.
AreaPipingA P1 AreaPipingB P2 AreaPipingC P3 AreaPipingD P4 PipeRackA P5 PipeRackB P6 PipeRackC P7 PipeRackD P8 UndergroundPipingA P9 UndergroundPipingB P10 ClassicDimensioningA P11 ClassicDimensioningB P12
I would like to break each line into two different strings. This is called parsing, correct? I just don't know how.
Any help would be greatly appreciated.
Scroll Bars On A Form
how do I make a form that has scroll bars on it, so it is bigger than it looks?
Thanks Nick
MSCOMM32.OCX Flow Control Problem
Hi,
When I use mscom32.ocx in VB6 to communicate with another PC (comport) it works fine when baudrate is 1200. (I use hyperterminal to test the communication. Now to my problem: I use mscomm32.ocx in a html-document with vbscript and when I use 1200 baud and send a long text string (about 150 characters), only about 40 characters appears on my PC (with hyperterminal). I use xon/xoff but it seems does not matter. I think it is some flow control problems or queue problems. If I change baud rate to 9600, all characters transfers to my PC (hyperterminal). I.e. Low buad rate I get queue problems Please help, what is the problem???
Here is my code: <html> <OBJECT codebas="c:windowssystem32mscomm32.ocx" classid=clsid:648A5600-2C6E-101B-82B6-000000000014 id=MSComm1 style="LEFT: 54px; TOP: 14px"> <PARAM NAME="_ExtentX" VALUE="1005"> <PARAM NAME="_ExtentY" VALUE="1005"> <PARAM NAME="_Version" VALUE="393216"> <PARAM NAME="CommPort" VALUE="1"> <PARAM NAME="DTREnable" VALUE="-1"> <PARAM NAME="Handshaking" VALUE="1"> <PARAM NAME="InBufferSize" VALUE="1024"> <PARAM NAME="InputLen" VALUE="0"> <PARAM NAME="NullDiscard" VALUE="0"> <PARAM NAME="OutBufferSize" VALUE="512"> <PARAM NAME="ParityReplace" VALUE="63"> <PARAM NAME="RThreshold" VALUE="14"> <PARAM NAME="RTSEnable" VALUE="0"> <PARAM NAME="BaudRate" VALUE="1200"> <PARAM NAME="ParitySetting" VALUE="0"> <PARAM NAME="DataBits" VALUE="8"> <PARAM NAME="StopBits" VALUE="0"> <PARAM NAME="SThreshold" VALUE="0"> <PARAM NAME="EOFEnable" VALUE="-1"> <PARAM NAME="InputMode" VALUE="0"></OBJECT>
<SCRIPT LANGUAGE="VBScript"> MSComm1.PortOpen =True MSComm1.output ="fasdfsasdfsddddddddddddddddddddddddddddddddddddddddddddddddddddddPAgdfgsdgdfgsdfgsdgsdgdsgdfgdfgsd gsgsfgsdfggkjasgklöjqerjklgkdfgjlkadfgjlasfjkgklafjgkljasdfklgjaklgjlaksfjglkfsfsfsfsdfsdfsdfsdkkkkk kkkkkkkk" MSComm1.PortOpen = False </script>
</html>
Adding 2 Or + Levels In XML
Hi,
I´m new in XML. I'm trying to create a new XML document. The problem is that I can´t create a second level child, here is what I'm suppose to do:
<?xml version="1.0" encoding="UTF-8"> <Data> <PosMsg> <TipoMov>POS</TipoMov> <Antena>GTA00014</Antena> <Latitud>22.8965454101563</Latitud> <Longitud>-98.4695587158203</Longitud> <Fecha>2005-10-02T06:40:36</Fecha> <Mensaje></Mensaje> </PosMsg> </Data>
Can anybody tell me how to create the <PosMsg> node? This is my program:
Dim doc As New DOMDocument40 Dim version As IXMLDOMProcessingInstruction Dim el As IXMLDOMElement Dim father As IXMLDOMNode doc.preserveWhiteSpace = False doc.async = False ' add xml version element Set version = doc.createProcessingInstruction("xml", "version=""1.0"" encoding=""utf-8""") doc.appendChild version ' add base AFE element doc.appendChild doc.createElement("Data") 'doc.appendChild doc.createElement("PosMsg") Set father = doc.createElement("PosMsg") 'father.appendChild doc.createNode doc.documentElement.appendChild father ' set default namespace to that of schema Set el = doc.createElement("TipoMov") el.appendChild doc.createTextNode("POS") doc.documentElement.appendChild el Set el = doc.createElement("Antena") el.appendChild doc.createTextNode("GTA00222") doc.documentElement.appendChild el Set el = doc.createElement("Latitud") el.appendChild doc.createTextNode("25.223432") doc.documentElement.appendChild el Set el = doc.createElement("Longitud") el.appendChild doc.createTextNode("-100.23453") doc.documentElement.appendChild el Set el = doc.createElement("Fecha") el.appendChild doc.createTextNode("2005-12-31T23:59:59") doc.documentElement.appendChild el Set el = doc.createElement("Mensaje") el.appendChild doc.createTextNode("") doc.documentElement.appendChild el
MsgBox doc.XML
Thanks,
Vach
Run-Time Error: 3246
Application cancelled due to associated object. I installed Crystal Report. Could this have messed with my ODBC and caused this error to come up? Somebody help.
Thanks
David
Ole Db
I am wondering if anybody can give me explaination about OLE DB. and perhaps some sample senario or sample code.
Thank you very much.
Printing Forms?
I have a graph and a datagrid that correspond to each other on a form. I want to print the form so that I can see both. If I have my graph the size I want it takes up about 3/4 of the screen. Then when I print it out it cuts half of the data grid below it but only uses 1/2 of the paper(8 1/2 x 11 portrait). Is there anyway to scale the form objects so they print out on a full piece of paper?
Viewing Code
How can I view the source code if I have the compiled EXE file only? Thanks.
System Tray
How do i add my program down ther e?
Help Me Out Again..SaveAs Spec Path
this is what I have......
Bestandsnaam = txtbestelnummer + txtSector
With Dialogs(wdDialogFileSaveAs) .Name = Bestandsnaam .Show End With
but I want to save to a spec.path, like...D:Orderforms
Can't figure it out..()
Looping A Range Using Cells Property.
Hi Guys.
Possibly somethign silly im doing but can you have a look at this.
Code: Sheets("TEST").Select Dim i As Integer j = 3 'this is the index for the rows in the Result 1 sheet 'Do While Cells(i, 14) <> "" Columns("N:R").Select Selection.EntireColumn.Hidden = False For i = 3 To Selection.CurrentRegion.Rows.Count - 1 Select Case Cells(i, 14).Value Case "Timmy OToole" With Cells(i, 25) .Value = "TOC" ' displays name tic as cell value .Interior.ColorIndex = 8 ' colours cell blue .Font.ColorIndex = 2 'colours text white End With Case "Jim Bob" With Cells(i, 25) .Value = "TIC" ' displays name tic as cell value .Interior.ColorIndex = 5 ' colours cell blue .Font.ColorIndex = 2 'colours text white End With j = j + 1 End Select Sheets("TEST").Select 'i = i + 1 Next i
Above code works perfect scans down "N" Column and checks to find all names in the case's. Will add alot more eventually once the output is fixed. It then formats a cell in a different column to indicate a positive result in the associated cell.
What i'm trying to do is scan coulmn "N" to "R" for the names and then move to next row. I tried the following code
Code: Sheets("TEST").Select Dim i As Integer j = 3 'this is the index for the rows in the Result 1 sheet 'Do While Cells(i, 14) <> "" Columns("N:R").Select Selection.EntireColumn.Hidden = False For i = 3 To Selection.CurrentRegion.Rows.Count - 1 Select Case Range(Cells(i, 14), Cells(i, 18)).Value Case "Timmy OToole" With Cells(i, 25) .Value = "TOC" ' displays name tic as cell value .Interior.ColorIndex = 8 ' colours cell blue .Font.ColorIndex = 2 'colours text white End With Case "Jim Bob" With Cells(i, 25) .Value = "TIC" ' displays name tic as cell value .Interior.ColorIndex = 5 ' colours cell blue .Font.ColorIndex = 2 'colours text white End With j = j + 1 End Select Sheets("TEST").Select 'i = i + 1 Next i
But the error lands on this line
Code: Select Case Range(Cells(i, 14), Cells(i, 18)).Value
Any help would be much obliged.
Al
Edited by - Big Al Inc on 6/1/2007 2:13:47 AM
Datagrid Problem
i want to ask something.. there's a property in datagrid that call button right? with that property we can make the datagrid show like a dropdown list when we click the columns that have that property right?
what i want to ask is 1. how to fill the dropdown value..like "yes" and "No" 2. can the button change to other button like checkbox? so it can properly show to user what the columns means(in this ex: "Yes" and "NO") instead showing dropdown..
many many thanks, erick
Database & Package Wizard
Im at my wits end. I have an app that uses ADO, i.e. in code I have this:set con = new ADODB.Connectioncon.ConnectionString = "DRIVER=(Microsoft Access Driver (*.mdb)); DBQ=servicewizard.mdb; ..."con.OpenThe open method gives an error: "Class not registered"I created the install for this app with the Package and Deployment Wizard. The install itself did get an error: "Unable to load file MSDADC.DLL to register it". Clicking OK (only option) continues the install. The app will then load the main frame; but running any option that has the above code in the form load gets the error mentioned above and then aborts.Is there an ADO file missing or is there something just not registered? I feel that its probably a registration issue because I have installed it on 1 machine and it works fine but on another machine all these problems. The working machine likely already has the necessary things registered.Why did the error occurr during the install? The install was created with the Package and Deployment Wizard.If I run the mdac_typ.exe to install Microsoft Data Access 2.0 I get a message that the machine does not have and will need DCOM95 installed. Im not directly using DCOM anywhere and it seems that the wizard should include everything necessary to run the app.Pleeeeeeese Help. I am completely stumped. I am not new to VB but this is the first Install that I have done.Lee BarnardAtlanta, GA
Change Of Text
my program is about to calculate the amount after the customer purchase something,i got a problem that when i key in the quantity suppose, the unit price and quantity will be multiply together and display me the amount. but when i run this program, it will come out with "type mismatch" and "unable to bind to the field or quantity data member", but i check my textbox of quantity, it link to the member "quantity" in table, and my data type in database is setting up. here my code. //////////////////////////////////////////////////////////////// Private Sub txt_quan_Change() Dim amount, price As Currency Dim quan As integer amount = txt_amount.Text price = txt_price.Text quan = txt_quan.Text amount = price * quan End Sub /////////////////////////////////////////////////////////////// inside my database i set price and amount to currency, quantity to integer.when run this program, the line price=txt_price.text is highlighted.what's wrong
How The Textbox Will Over The Next Line
I want that the textbox over to a new line after every input of a string
A Couple Of Questions...
OK, first, eairler i asked about how to toggle check boxes with the webbrowser control, and i got that down, now i need to know how to toggle options. There are a total of 3 options on the page, all with the same name of "which0". I need to be able to toggle any of them depending on the users choice. what i have right now (and it doesnt work) is:wb1.document.all.which0(0).checkedIs that even remotely close to what i need??OK, now the other question...How can i determine if the user has an active connection to the internet? I would prefer and API call, but if i have to use winsock or something i will.Thanks for all who will help!Spike
DataGrid Question
I want that when I click a row on a datagrid, that particular row must get deleted.
Formatting TextColumns
Greetings, I must set a certain range to have 3 TextColumns. The problem is that the formatting is always applied to the whole document, which is of course not what I meant to do.
Here is the code I am using right now:
Dim c As Long Dim x As Range For c = 2 To InlineShapes.Count Set x = ThisDocument.Range(InlineShapes(c).Range.End, InlineShapes(c + 1).Range.Start) x.PageSetup.TextColumns.SetCount 3 Next c
Thanks for any help, -Eric Fournier
Possible? VB6 Vb.NET
hi
Is it possible to write some application (prg) in VB.NET and use it in VB6 something like activexEXE we use to write in VB6.
Possible????
Thanks
Copyright Notice
|