153 Posted Topics

Member Avatar for masterfact18

[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.?

Member Avatar for AndreRet
0
172
Member Avatar for abelingaw

[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 & …

Member Avatar for AndreRet
1
146
Member Avatar for PinoyDev

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]

Member Avatar for PinoyDev
0
106
Member Avatar for masterfact18

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 …

Member Avatar for AndreRet
0
544
Member Avatar for masterfact18

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.

Member Avatar for peter_budo
0
155
Member Avatar for masterfact18

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 …

Member Avatar for abelingaw
0
289
Member Avatar for neelle26

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 …

Member Avatar for abelingaw
0
114
Member Avatar for abelingaw

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 …

Member Avatar for jhai_salvador
0
529
Member Avatar for prajana
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
115
Member Avatar for abelingaw

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 …

Member Avatar for dietdew12z
0
100
Member Avatar for abelingaw

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

Member Avatar for AndreRet
0
107
Member Avatar for PM312

[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) …

Member Avatar for AndreRet
0
130
Member Avatar for raven_rainagi
Member Avatar for AndreRet
0
56
Member Avatar for PM312

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 …

Member Avatar for PM312
0
134
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
356
Member Avatar for problematic:)
Member Avatar for ashwin149

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 …

Member Avatar for AndreRet
0
83
Member Avatar for abelingaw

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 …

Member Avatar for jhai_salvador
0
109
Member Avatar for abelingaw

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] …

Member Avatar for AndreRet
0
270
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
674
Member Avatar for undersurvival

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.

Member Avatar for AndreRet
0
1K
Member Avatar for daniwaber

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 …

Member Avatar for AndreRet
0
166
Member Avatar for pardeep3dec

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 …

Member Avatar for abelingaw
0
127
Member Avatar for kkcaddy

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

Member Avatar for kkcaddy
0
96
Member Avatar for Naveed_786

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.

Member Avatar for AndreRet
0
205
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
97
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
273
Member Avatar for Naveed_786

Have a look at this: [URL="http://www.vbtutor.net/lesson26.html"]http://www.vbtutor.net/lesson26.html[/URL]

Member Avatar for AndreRet
0
147
Member Avatar for abelingaw

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!"; …

Member Avatar for abelingaw
0
604
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
111
Member Avatar for a1a4a

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 …

Member Avatar for AndreRet
0
131
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
145
Member Avatar for cavern

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 …

Member Avatar for cavern
0
207
Member Avatar for Strangelle

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 …

Member Avatar for AndreRet
0
517
Member Avatar for anuj_sharma
Member Avatar for abelingaw
0
230
Member Avatar for cavern

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 …

Member Avatar for abelingaw
0
158
Member Avatar for abelingaw

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. …

Member Avatar for abelingaw
0
107
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
248
Member Avatar for shabadoo

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 …

Member Avatar for abelingaw
0
112
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
523
Member Avatar for abelingaw

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 …

Member Avatar for abelingaw
0
667
Member Avatar for abelingaw

[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 …

Member Avatar for abelingaw
0
106
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
119
Member Avatar for Halbo

[url]http://www.daniweb.com/forums/thread319130.html[/url] Please start your own thread. Dont bump

Member Avatar for AndreRet
-1
371
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
284
Member Avatar for leiron16

[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.

Member Avatar for abelingaw
0
364
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
141
Member Avatar for abelingaw

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 …

Member Avatar for PoisonedHeart
0
1K
Member Avatar for abelingaw

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 …

Member Avatar for AndreRet
0
136

The End.