153 Posted Topics
Re: [CODE] If rs.BOF = True Or rs.EOF = True Then MsgBox "No items available to sell." [/CODE] Try using [CODE] If rs.Recordcount = 0 Then MsgBox "No items available to sell." [/CODE] Can you show your modified code.? | |
[URL="http://www.daniweb.com/forums/thread341763.html"]http://www.daniweb.com/forums/thread341763.html[/URL] Regards to that, i also wanted the system not to be able to delete Administrator Accounts via my code also posted there. Here's the code again: [CODE] Private Sub cmdDelete_Click() ' On Error GoTo err Dim intYN intYN = MsgBox("You are about to delete a record." & vbCrLf & … | |
Re: You can also use this code snippet from Jhai. [URL="http://www.daniweb.com/code/snippet336042.html"]http://www.daniweb.com/code/snippet336042.html[/URL] | |
Re: I only posted that code (still basing on yours) to give you some idea regarding database connection/s. That code was already posted by me here in the forum too (for some problems), you can at least try to fix your problem and give us some output but we don't do … | |
Re: I believe you already created a thread regarding this topic. [URL="http://www.daniweb.com/forums/thread342079.html"]http://www.daniweb.com/forums/thread342079.html[/URL] Double posting. | |
Re: Try: [CODE] Option Explicit Dim passattemp As Double Dim db As ADODB.Connection Dim rs As ADODB.Recordset Private Sub cmdLogin_Click() Dim User As String Dim CurrentPosition As String If Text1.Text = "" And Text2.Text = "" Then MsgBox "Data required, please enter a valid username and password!", vbCritical, "Log-in Error" Text1.Text … | |
Re: For the percentage: [CODE] Dim x as Integer ' General Declaration Area Private Sub cmdPRCNT_Click() Text1.Text = x * (Val(Text1.Text) / 100) End Sub [/CODE] On the On/Off button thingy, use a frame control and put all command buttons on it except the On/Off key. On design time, set the … | |
Ok, here's another problem which i really need help. One suggestion from our panel suggested if we can have a module which do not allow deleting a record (one or more) in the database which are Administrator type. Those records cannot be deleted whether through 1. the program itself (via … | |
Re: What have you done so far, can you show us some codes? | |
Regarding my earlier post. [URL="http://www.daniweb.com/forums/thread327097.html"]http://www.daniweb.com/forums/thread327097.html[/URL] I encounter an error saying [ICODE] Run-time error '462': The remote server machine does not exist or is unavailable [/ICODE] Haven't notice this error earlier. Code: [CODE] wrdApp.Documents.Open App.Path & "\Reports\Locatorslip.docx" wrdApp.WindowState = wdWindowStateMaximize wrdApp.Visible = True [/CODE] The code works fine. Error only appears … | |
i have to make a log in form that displays a msg if the user uses the username 'letmein' if not, a msg will also be printed. But the message to be printed aren't showing. Here's my code: [CODE] <html> <head> <?php if (isset($_POST['submit'])) { $username = $_POST['username']; if ($username … | |
How do i populate a combobox with values from a certain field on my database when i click the control? My combobox control name :cbodept Dbase table: Offices and Dbase Table field is: Office Preferably code. Thanks | |
Re: [QUOTE] but i have lost text and locked property of text box as it is not available on user control. can this text and locked property of text box on user control can be accessed any other way. [/QUOTE] Do you mean typing on the textbox is disabled? (I'm confused) … | |
Re: You should provide us more details so we can help you with the proper solution. | |
Re: Yes you can but not if you take the whole project as a whole. VB6 default font and font size can be set by form. Create a new form and set the font settings first before creating any controls (textbox, labels, etc.) But you have to do this again and … | |
Is it possible to print a report in VB using only Data Environment. I mean setting the textboxes only to datasource and datafields in the record I really dont want to use codes (RS, things like that) cause you see, I'm kind of a rushing so i don't have much … | |
Re: Can you tell what errors you've encountered.? | |
Re: Try this: [CODE] Dim con as new ADODB.Connection Dim rs As New ADODB.Recordset If txtSEARCH.Text = vbNullString Then MsgBox " The search field is empty.", vbExclamation 'Change message if you want txtSERACH.SetFocus End If With rs If .State = adStateOpen Then .Close 'TABLENAME - replace with your table name 'txtSEARCH … | |
Im getting this error: [ICODE] Arguments are of the wrong type, out of range or are in conflict with another [/ICODE] Here's my code: [CODE] rivate Sub cmdPrintSel_Click() Call Con("Database.mdb") RecSet.Open "Select Payroll.EM_ID, Payroll.EM_Name, Payroll.EM_Dep, Payroll.Monthly_Rate, Payroll.dDate, Payroll.xBonus, Payroll.xOT, Payroll.GSIS, Payroll.PH, Payroll.InTax, Payroll.Others, Payroll.absences, Payroll.Advances, Payroll.NetPay " & _ "From … | |
Ok, my code for my Backup module works well via Copyfile. Here's what it can do (current): [COLOR="Red"]Backup my Database but using the date function as its filename Restore my backup file only if the filename is Database.mdb[/COLOR] Here's a screenshot of the prog: [URL="http://img262.imageshack.us/i/restore.png/"]http://img262.imageshack.us/i/restore.png/[/URL] and the backup files: [URL="http://img152.imageshack.us/i/backups.png/"]http://img152.imageshack.us/i/backups.png/[/URL] … | |
Having trouble with my code. You can see the values of the list in the code. Here's my code: [CODE] If cboGender.Text <> "Male" Or "Female" Then MsgBox "Please select from the list provided.", vbExclamation, "Error": cboGender.SetFocus: cboGender.Text = "Male": Exit Sub If cboGender.Text = vbNullString Then MsgBox "Please select … | |
Re: Try: Modified code from sir Andre [CODE] Do while not rs.EOF = true Set list = ListView1.ListItems.Add , , rs.Fields!("RecordNumber") lista.ListItems(lista.ListItems.Count).SubItems(1) = rs.Fields!("Firstname") lista.ListItems(lista.ListItems.Count).SubItems(2) = rs.Fields!("Lastname") lista.ListItems(lista.ListItems.Count).SubItems(3) = rs.Fields!("Birthdate") rs.MoveNext Loop [/CODE] Is that lista or list.? Confuses me. Just change to list if not lista. | |
Re: Try: [CODE] Private Sub cmdBackup_Click() call FCopy End Sub Public Sub FCopy() On Error GoTo err: 'myFile - Change if desired Dim myFile As New FileSystemObject Set myFile = Nothing myFile.CopyFile App.Path & "\MyFolderFrom", App.Path & "\MyfolderTO\", True 'App.Path - if the folder you would like to copy is in … | |
Re: Menu > Add Module > OK then Write your code/s. You can use your module by the CALL argument of whatever you have declared in your module. At the guy above me: Have a try on this: [CODE] Public Dbconn As New ADODB.Connection Public rs As New ADODB.Recordset Public Sub … | |
Re: I suggest you use use a full version rather than a portable. Portables doesn't contain all features of the VB App (Full), which may be the problem. Use the full version. Google it | |
Re: Try: [CODE] If txtsub.Text = rs2.Fields![subjects] then MsgBox "Please enter StudentID!", vbExclamation, "Error" txtempno.Text = vbNullString txtempno.SetFocus End if [/CODE] Haven't try this but just think of the concept. If the textbox value is equal to any record on the database (or what column that is) then the message appears. | |
I would like my login form to display a message when the user logging in pressed the CAPSLOCK key when he is entering data in the password textbox. I tried using this code on Keypress Event [CODE] If KeyAscii >= 65 And KeyAscii <= 90 Then txtPass.Locked = True Msgbox … | |
I'm having this problem regarding my Backup code. I get an error saying "Permission Denied". Here's my code: [CODE] Public Sub DBBackup() Dim fsys As New FileSystemObject Dim myfile As File Dim isTrue As String Dim isFalse As String Set myfile = fsys.GetFile(App.Path & "\Database.mdb") 'Create Backup folder if not … | |
Re: Have a look at this: [URL="http://www.vbtutor.net/lesson26.html"]http://www.vbtutor.net/lesson26.html[/URL] | |
Using Borland C++ 3.0 Here's my code: [CODE] #include<iostream.h> #include<conio.h> int main() { int m,d; int i=0; clrscr(); cout<<"\nEnter Birthday month: "; cin>>m; cout<<"\nEnter Birthday day: "; cin>>d; cout<<"\n"; { if(m==3 && d>=21) cout<<"ARIES!"; else if (m==4 && d<=20) cout<<"ARIES!"; else if(m==4 && d>=21) cout<<"TAURUS!"; else if(m==5 && d<=21) cout<<"TAURUS!"; … | |
OK, i have this Backup module for my system's database. Now i would like to have a module of restoring and deleting backups of it. Here's some info: The backup files created are stored in a Folder named "Backup" My database has 2 Columns having OLE type objects, Pictures and … | |
Re: You mean showing records from your Database to a form.? Try using Listview. Heres a sample: [CODE] Public Sub Init_Data() 'On Error GoTo err: If rs.State = adStateOpen Then rs.Close lvlEmpInfo.ListItems.Clear 'lvlEmpinfo - name of the Listview rs.Open "Select * from Tablename", Dbconn, adOpenKeyset, adLockPessimistic 'Dbconn is my Database connection … | |
Ok i have this form used for registering user for my program (User and Admin type) When i run it, i get an error that says "Invalid Property Value" This is my code for my GetUsers function called on my Form_Load event [CODE] Public Sub GetUsers() ' On Error GoTo … | |
Re: Try this. [CODE] Private Sub cmdSave_Click() On Error Resume Next If txtDate.Text = "" Then MsgBox "Insufficient Data.", vbInformation, "Information": txtDate.SetFocus: Exit Sub If cmbTitle.Text = "" Then MsgBox "Insufficient Data.", vbInformation, "Information": cmbTitle.SetFocus: Exit Sub If txtName.Text = "" Then MsgBox "Insufficient Data.", vbInformation, "Information": txtName.SetFocus: Exit Sub If … | |
Re: Hhhmm. I think it has something to do with Timer. Set its interval and when it reaches the limit, like in every 3 minutes, it will do the saving function. I don't know code for that though, you can just google codes for the Timer. I am noob in networking … | |
Re: Currently uploading for you and other users. Just an hour, my connection's a little bit slow | |
Re: Is this VB (4,5,6) or VBA (dont really know what is VBA ;) I think there's no code as "Insert Into" in VB ( at line 10). Looks like Php to me. Try this: [CODE] Dim rs as New ADODB.Recordset With rs .Open "select * from Pemilik", Dbconn, adOpenDynamic, adLockOptimistic … | |
Regarding my previous post: [URL="http://www.daniweb.com/forums/thread326976.html"]http://www.daniweb.com/forums/thread326976.html[/URL] I manage to correct that error. Now my problem is the misplacement of records on my fields. Records that suppose to be in the Region field now displays at the Name field. Records that should be on the Zipcode field now at the Age field. … | |
Ok, im having a long time creating reports for my program. I would like to ask if it is possible to connect my program to an existing msword file. E.g: If i click a button on my form, lets say cmdLeaveReport, an msword file named leavereport.doc will open (of course … | |
Re: You can also add this code to alert a user before closing a (any) form. [CODE] Private Sub Form_Unload(Cancel As Integer) Dim strMess If LogOff = False Then strMess = "You are about to close the Automated Payroll System." & vbCrLf & vbCrLf & "Are you sure?" If MsgBox(strMess, vbQuestion … | |
Ok here's what i want to do. I woul like to disable the toolbar and menubar in my main form depending on the usertype that was logged in. My dbase field is UserType and record type can only be User and Admin (Depends on the registration). When a user log … | |
Here are the errors im getting. [CODE]Notice: Undefined index: address in C:\wamp\www\Insertrecord.php on line 24 Notice: Undefined index: status in C:\wamp\www\Insertrecord.php on line 25 Notice: Undefined index: religion in C:\wamp\www\Insertrecord.php on line 26 Notice: Undefined index: region in C:\wamp\www\Insertrecord.php on line 27 Notice: Undefined index: zipcode in C:\wamp\www\Insertrecord.php on line … | |
[CODE] <html> <head> <title>Records</title> </head> <body> <?php $fname=$_POST['fname']; $age=$_POST['age']; $birthday=$_POST['birthday']; $con = mysql_connect('localhost', 'root' , ''); if (! $con) { die(mysql_error()); mysql_select_db("database" , $con) or die("Select Error: ".mysql_error()); } $result=mysql_query("INSERT INTO Record (Name, Age, Birthday) VALUES ( '$fname', '$age', '$birthday')") or die("Insert Error: ".mysql_error()); mysql_close($link); print "Record added"; ?> <form … | |
Uhm ok. I am near n finishing my project (Payroll System) But im having problems regarding some codes and i am only able to fix some of it My real problem is the saving of picture in the database. Have the code, works well but doesn't save the pic as … | |
Re: [url]http://www.daniweb.com/forums/thread319130.html[/url] Please start your own thread. Dont bump | |
I have finish coding some of my Payroll Program modules. But im having a problem on the log-in. I would like the log-in to determine the type of the user logging in, a User or Admin (Level Access of course). If it is a User, all command buttons in every … | |
Re: [QUOTE=sinduja;712858]Can anyone tel me where to microsoft vb 6.o. iI couldn find it in the miocrosoft.com.pls suggest anyother sites.[/QUOTE] If u can give me a site that allows me top upload 300MB file size at once, i can upload the installer for you. Please dont bump threads, start your own. | |
Ok, i have this form which contains a Datagrid control, i have fix the 1st problem i encountered which is how to connect it to my Dbase to display the content of one of my tables. Now my problem is, i cant delete records in my Dbase thru selecting it … | |
SOFTWARE: If i install a Payroll System made from VB6, would this be enough for its requirements..? [COLOR="Red"]SOFTWARE: Windows XP (Any Service Pack) MS Access 2003 or Higher HARDWARE: Hardware Requirements * 200 Mhz Processor * 128 Mb RAM or Higher * 100GB SATA (Serial Advanced Technology Attachment) Hard Drive … | |
Ok here's my problem. What i wanted to do was that if i save the value i enter on my txtbox (txtIDNo) and saves it to my database, the default value should automatically adds 1 or + 1 on it. I set the field data type to Number and the … |
The End.