652 Posted Topics
Re: Hi, Your Code always delees first record.. as you have not used a "Where" condition in your recordset... Instead of that, run the "delete" command, and refresh the grid.. something like this: strSQL = "Delete From Company Where [Company Name] = '" _ & fgdCompany.TextMatrix(fgdCompany.Row, 1) & "'" Cn.Execute strSQL … | |
Re: Hi, Yes, as Chris above said, If [Tour ID] is a numeric field, then you should not wrap it with single quotes.... strSQL = "Delete From Tour Where [Tour ID]=" & Val(fgdTour.TextMatrix(fgdTour.Row,1)) Regards Veena | |
Re: Hi, Just call the second form Modal: Write this in MainForm: frmChild.Show 1 Regards Veena | |
Re: Hi, Before Line 8, wite this: If Not recsetCheck.EOF Then Write "End If" on line 24 Regards Veena | |
Re: Hi, Something like this : dim i as long i = rs.AbsolutePosition rs.Delete rs.ReQuery If Not rs.EOF Then rs.MoveFirst rs.Move i End If Regards Veena | |
Re: Hi, Your SQL String, shows only 2 values... You need to Insert 3 values..... If u get confused, write Debug.Print sSQL and check in the immediate/debug window... Regards Veena | |
Re: Hi, In report, if "Convert Null To Defaults" setting is ON, then you have to check like this : Report.RecordSelectionFormula = "totext({Prescriptions.RecDateR}) = ''" Regards Veena | |
Re: Hi, I guess, You have not Declared a Connection Object.. and you need to open Conn object before opening the recordset... Check this out: [code=vb] 'Declare this Form-Level Dim Conn As New ADODB.Connection 'In FormLoad open the connection object: With Conn .ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source = C:\MyDB.mdb" .Open End With … | |
Re: Hi, In D.Env, u have to write: Select * from item where date and date between ? and ? Then select appropriate type in parameter list.. Regards Veena | |
Re: Hi, Use "MkDir" MkDir "C:\MyNewFolder" before that, you need to make sure, the folder does not exist Regards Veena | |
Re: Hi, Set BorderStyle of the form to : 1 -Fixed Single Regards Veena | |
Re: Hi, Depends on Which Version of SQL Server you want to Add/use..? Regards Veena | |
Re: Hi, You have to use parameters or build SQL Statement accordingly: connection.Open() mystr = "INSERT INTO AddReports " _ & " (date_Filed,filedUser,reported_Problem,isolation, " _ & " support_By) VALUES (#" & dateFiled & "#,'" & user _ & "','" & prob & "','" & isolation & "','" & support & "')" … | |
Re: Hi, Just use: Picture1.Cls Regards Veena | |
Re: Hi, First you have to View Source of the WebPage and then, check where the text is located... it may be a Label or DIV or a Row/Cell in Table... Search accordingly and display... Regards Veena | |
Re: Hi, May be the button name does not match... what you can do is search all the objects in the webpage, and click based on the caption.. Check here: http://vbcity.com/forums/t/94102.aspx Regards Veena | |
Re: Hi, After Changing Font Size, again change File1's height.. Regards Veena | |
Re: Hi, Write the code in LostFocus event... and change the sql statement to query for date condition as well... Dim TNo As Integer TNo = 0 con = New OleDbConnection("Provider = Microsoft.ace.oledb.12.0; " _ data source=|DataDirectory|\AutomatedLibrarySystem.accdb") cmd = New OleDbCommand("Select Count(*) from Borrowing where Username='" _ & TextBox11.Text + "' … | |
Re: Hi, Simply use Combination of Drive ListBox, Directory List Box and File List Box from the tool box.. Regards Veena | |
Re: Hi, Check This : http://www.dailydoseofexcel.com/archives/2004/12/22/page-of-pages-in-a-cell/ Regards Veena | |
Re: Hi, You have already opened the file with variable "myfile", before closing that, you cannot again open the same file... You have to close that file and re-open... or open one more new file with diff name for writing write all the data.. close and rename it with original path. … | |
Re: Hi, Add a New dummy form, place MSComm control on that form, Load that form and hide it... call the same control in other forms.. say, Form1.MSComm1.Port.... Regards Veena | |
Re: Hi, All the validation code has to be written in "_Validate" event, not change event... Regards Veena | |
Re: Hi, Like ADO recordset, you dont have to write ".Edit" explicitly... just change and save... something like this : ADOTime("MyField") = Text1.text ADOTime.Recordset.Update Just make sure, Recordset is Dynamically opened.... Regards Veena | |
Re: Hi, check this : [url]http://www.vb-helper.com/howto_shell_wait.html[/url] [url]http://www.codeguru.com/forum/archive/index.php/t-202235.html[/url] Regards Veena | |
Re: Hi Suneel, Add DAO reference :Microsoft DAO 3.51 object Library To ur Project and use thos code: [code] Dim DB As Datbase Dim RST As RecordSet Dim sSQL As String Set DB = DBEngine.OpenDatabase("C:\MyDBFFolder", False, False, "dBASE III;") sSQL= "Select * From MyTable" Set RST= DB.penRecordset(sSQL) [/code] Note In Above … | |
Re: Hi, When u purchase BarCode Scanner, it Comes with complete Package (Fonts/LabelPrint/ReaderSettings etc..) What we normally do is, When Purchase, A unique Number is allotted to that medicine/Item. In Item Printing, "BarCode" font is used for that Unique key. This label is sticked on the Item. While Sales, when u … | |
Re: Hi, Your Procedure declaration should be like this : [CODE] Private Sub SelectCBO(ItemID As Long, combo As ComboBox) [/CODE] Rest of the code looks OK. While calling the procedure call : Call SelectCB0(100, cboCombobox) Not sure what is [B].itemID[/B] ..? Regards Veena | |
Re: Hi, Add this Reference to your project: Microsoft DAO 3.6 Object Library Check This : [url]http://support.microsoft.com/default.aspx?scid=kb;EN-GB;q238401[/url] Regards Veena | |
Re: Hi, Write this in "Add New" event: MDIParent.cmdPrint.Enable = False Later on dont forget to Enable it... Regards Veena | |
Re: Hi, Change the code to : To Add record: [CODE] RS.Open "SELECT * from Phonebook", conn, adOpenDynamic, adLockOptimistic RS.AddNew RS!Customers_Name = txtName.Text RS!Address = txtAddress.Text RS!Mobile = txtMobile.Text RS!Telephone = txtTelephone.Text RS.Update [/CODE] To Edit the record: [CODE] RS.Open "SELECT * from Phonebook Where Customer_Name = '" & txtName.Text & … | |
Re: Hi, If you have Outlook configured, try this : [url]http://support.microsoft.com/kb/161833[/url] Without outlook: [url]http://www.astahost.com/info.php/Send-Email-Vb-Smtp_t5431.html[/url] (need gmail id) Regards Veena | |
Re: Hi, Your code should look like this : [CODE] 'for first form Public Function GetMessageVal() As String GetMessageVal = InputBox("Enter New Value") End Function 'form 3rd form Private Sub Form_Load() Label1.Caption = Form1.GetMessageVal End Sub [/CODE] Regards Veena | |
Re: Hi, To Make your Job Easy, Cut and Paste all the Controls (Labels and TextBoxes) from the form to a Frame Control. Then Just make Visible True Or False (Or Enable / Disable) ONLY THE FRAME CONTROL.... No need to write to all the controls Regards Veena | |
Re: Hi, Disable the FlexGrid.. But, why do you want to do that..? Regards Veena | |
Re: Hi, Right Click Grid and Set property : "ScrollBar - Both" Grd.Rows = 5000 You will get scrollbar automatically.. Regards Veena | |
Re: Hi, Check this : [url]http://www.dbforums.com/microsoft-sql-server/972446-vb6-how-i-cant-get-determine-server-name.html[/url] Regards Veena | |
Re: Hi, check this : [CODE=] Dim queryString As String = _ "Select Sec FROM codes where username = '" & Info.Text _ & "' AND code = '" & Form5.Code.Text & "';" Using connection As New SqlConnection(connectionString) Dim command As New SqlCommand(queryString, connection) connection.Open() Dim reader As SqlDataReader = command.ExecuteReader() … | |
Re: Hi Shilpa, The code, you have given is for sending EMails not SMS. For SMS, you need to use SMS Gateways.. (like GupshupSMS, mvaayoo) Regards Veena | |
Re: Hi, use this code in Form_resize event: [code] Image1.Left =0 Image1.Top =0 Image1.Width = (Me.Width * 0.9) Image1.Height = (Me.Height * 0.9) [/code] Regards Veena | |
Re: Hi Yasir, Check This : Set DataCombo1.RowSource = RST DataCombo1.ListField= [COLOR=red][B]"Mill"[/B][/COLOR] Wrap [COLOR=red][B]Mill [/B][/COLOR]with double Quotes [COLOR=red][B]( " )[/B][/COLOR] Regards Veena | |
Re: Hi, Try This : Dbase.Execute(Delete * from SalesTable where eDate = #" _ & Format(DTPicker1.Value,"dd-mm-yyyy") & "#") OR Dbase.Execute(Delete * from SalesTable where eDate = CDate('" _ & Format(DTPicker1.Value,"dd-mm-yyyy") & "')") Regards Veena | |
Re: Hi, Copy this Function and Pass the form name. If form is loaded and not shown, then it's Visible property will be false, u need to check that: [code] Private Sub CheckFormStatus(Myform As Form) Dim objForm As Form Dim FlgLoaded As Boolean Dim FlgShown As Boolean FlgLoaded = False FlgShown … | |
Re: Hi, Goto Menu: Project >> Add Module Regards Veena | |
Re: Hi, [URL="http://www.vbforums.com/showthread.php?p=2362478#post2362478"]Try This[/URL] Regards Veena | |
Re: Hi, You dont need an API to know the Resolution.., Use Screen Object of VB: [code=vb] msgbox "Width = " & Screen.Width/15 _ & vbcrlf _ & " Height = " & Screen.Height/15 [/code] Regards Veena | |
Re: Hi, am not sure, if this going to help u, I think, u cannot directly refer "Cells", u need to refer it with range: (check ur With Statement) Range.Cells or WorkSheet.Cells Regards Veena | |
Re: Hi Code is Ok.. and dont worry u can add multiple forms to ur project. u r not able to see second form..? Check if Form2's Visible =True Regards Veena | |
Re: Hi, Check this Code: [code] Dim i As Integer Dim j As Integer Dim sSQL As String For i= Grd.Rows-1 To 1 Step -1 sSQL ="" For j= 0 to Grd.Cols-1 sSQL = sSQL & Trim(Grd.TextMatrix(i,j)) NExt If Trim(sSQL) ="" Then Grd.RemoveItem i End if If Grd.rows<=1 Then Exit For … | |
Re: Hi, Try this M$ Link: [url]http://support.microsoft.com/kb/185958[/url] In the form, Use "Common Dialog" control to browse and add.. Regards Veena |
The End.