- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 8
- Posts with Upvotes
- 6
- Upvoting Members
- 8
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Software Developer
- Interests
- Music
76 Posted Topics
Re: Hi, You have to save settings on Checkbox checkstate change event or in form close event too. Then only it work as per your expectation. Private Sub CheckBox1_CheckStateChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckStateChanged If CheckBox1.CheckState = CheckState.Checked Then My.Settings.Check = True Else My.Settings.Check = False End If My.Settings.Save() … | |
Re: hi, u can find difference between date and time by using datetime function. :-/ Try the below coding: [COLOR="Green"] 'To find Days [/COLOR] DateTime.DateDiff("d",Text1.Text,now) [COLOR="Green"] 'To find Months [/COLOR] DateTime.DateDiff("m",Text1.Text,now) [COLOR="Green"] 'To find Years [/COLOR] DateTime.DateDiff("y",Text1.Text,now) [COLOR="Green"] 'To find Hours [/COLOR] DateTime.DateDiff("h",Text1.Text,now) [COLOR="Green"] 'To find Minutes [/COLOR] DateTime.DateDiff("n",Text1.Text,now) [COLOR="Green"] 'To … | |
Re: hi, Try the below code. [CODE] Sub copycolumns() [COLOR="Green"]' ' copycolumns Macro ' Variable Declaration '[/COLOR] Dim strColName As String Dim intRng As Integer Dim i as Integer Dim strVal As String intRng = InputBox("Enter the No. of Columns?", "No. of columns") [COLOR="green"]'To get the No. of Columns Available to … | |
Re: hi, Use the below coding: [code] Private Sub upload_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim sqlcn As New SqlConnection("server=shailu;uid=sa;pwd=;database=master;") Dim sadapt As New SqlDataAdapter("select * from abcd", sqlcn) Dim ds As DataSet = New DataSet sadapt.Fill(ds, "abcd") DataGridView1.DataSource = ds.Tables("abcd") End Sub Private Sub DataGridView1_CellClick(ByVal sender … | |
Re: HI, To Refresh the Recordset you can use the [COLOR="Red"]ReQuery[/COLOR] which the query executes again to get the proper results. Shailaja:) [QUOTE=SPereira;648566]Hi Guys, I have written a program in VB 6 wherein I want to delete a particular record from MS Access Database Table. I noticed that the record does … | |
Re: hi, try the below coding. [code] Public Function ConvertFile(strSourceFileName As String) As Boolean On Error GoTo ErrorHandler Dim msExcel As Excel.Application Set msExcel = GetObject(Class:="Excel.Application") Dim p As String p = "Acrobat Distiller on Ne00:" msExcel.Visible = False msExcel.Workbooks.Open strSourceFileName strMenuFilePs = strSourceFileName msExcel.ActiveWorkbook.PrintOut ActivePrinter:=p, PrintToFile:=False, PrToFileName:=strMenuFilePs strMenuFilePDF = "c:\try.pdf" … | |
Re: Hi vanathi, Try the below coding [CODE] Private Sub Command1_Click() On Error GoTo ErrTrap [COLOR="Green"] 'DECLARE VARIABLES[/COLOR] Dim xApp As Object Dim xWb As Object Dim xWs As Object Dim strFileName Dim st As String Dim ed As String Dim rw As Integer Dim ct As String Dim img As … | |
Re: hi, CStr is used to Convert from other format to String Format then how can u add the values of the two variables. K. Anyway U can use Format function like below [COLOR="Red"]MsgBox Format("32234324", "$00,00")[/COLOR]. Try it Shailaja:) | |
Re: [QUOTE=buddha_lord;1246981]hello...im new in vb world.so please help me if someone can..my problem in details: 1.have created a ms access database file named Database2.mdb which has 5 columns as follows a,b,c,d and result.it has 5 row and a,b,c,d are filled with data but result column is empty. 2.have created a datagrid … | |
Re: hi, To check the Date entered by the user, use "IsDate" function. Use the below coding. [COLOR="Green"] If IsDate(Text1.Text)=False then msgbox "Wrong Data" End If [/COLOR] Regards. Shailu.:) | |
Re: hi, Just drag and drop the image box and use the picture property to load a picture. Then set the stretch property as true and then u can enlarge the image box with image to the size of the form. try it. best regards, shailu. | |
Re: I analysed your code. The code is for Updating the existing record so no need to update the field num. Rs.Update should end of all the fields. If you removed the starting Rs.Update then u can update. Just have a try and let me the status of it. Shailaja :) | |
Re: Check the below code. [CODE] Sub calculate() Dim i As Long For i = 2 To 1048576 'No. of rows in the Ms Excel 2007. U can modify according to ur excel version If Range("A" & i).Value <> "" Then If Range("A" & i).Value > Range("B" & i).Value Then Range("C" … | |
Re: Hi, Maheshsayani is right but dont use the single quote when you r trying to change the varchar to numeric. [CODE]convert(numeric, ISNULL(quantity, 0))[/CODE] Have a nice day Shailaja [QUOTE=maheshsayani;1008954]Hi, Below code can helps you.. [B]convert(numeric, ISNULL(quantity, '0'))[/B][/QUOTE] | |
Re: Hi, As you said the same code has been used for second code but the difference is filter correct. I think u forgot include the customer filter thats y u getting all customer details for the select date. U can do small changes as mentioned below to overcome this problem. … | |
Re: Hi, I think u have no clear about the concept of foreign key. Let me explain it. See there is a primary key which is parent column and foreign key which is child of the primary key to have a clear relationships to avoid the mismatches in between the tables. … | |
Re: Thanks a lot, your example is very useful to my requrirements Shailaja :) [QUOTE=Mike_Meg;173632]First I am new to all this but would the following work for you? The first query gives the same error as you were stating but if you replace the group by with a sub query and … | |
Re: Hi, Your code is not clear because in the code there are various procedures are called and i think you given only half of the code. From the message i get to know that you need to dowload the existing template file from the particular or any other location so … | |
Re: hi, Try the following code: 'Declare the function to open any type of file Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long 'Declare the … | |
Re: Hi, As you given in the thread is not clear because there is no recordset declaration but you setting recordset so if you need to know where is wrong then you have to give full code (i.e) connection and recordset declaration and way of using it. Have a nice day, … | |
Re: Hi, I got some idea from your thread but if you given me that excel file then that could be helpful to me. Have a nice day Shailaja :) [QUOTE=jackiejoe;939954]OK, this might be a bit too difficult to explain on the forum but I thought I would give it a … | |
Re: Hi, argFlexGrid.TextMatrix(i, j) = AfsugRS(j - 1) [QUOTE=craigallansmith;940772]Goodday All. I have imported data from an MS excel spreadsheet into MS Access. All goes well unit I try to populate a MSFlexgrid with an open recordset. In my code it shows me that each and every field is found except when … | |
Re: Hi, Try the following Script: [CODE] TRANSFORM Sum(item.Tk) AS [Total Of Tk] SELECT item.Category, Sum(item.Tk) AS [Total of Category] FROM item GROUP BY item.Category PIVOT item.Item; [/CODE] Have a Great Day Shailaja :) [QUOTE=abu taher;937752]I made a cross tab query. please see the attach file. the sum of category show … | |
Re: Hi, When we are using the class module then we have to create objects for that class. Each object has the property. The Property can be created by Let, Set and Get. To know more about the Property Let, Set and Get look into the attached file. Have a Good … | |
Re: Hi, You need to add the item details from the user. Then do one thing, (i.e) instead of displaying another grid better create a small form using controls containing details as you required. When user pressed Ok button then the details should be added to the existing one. This way … | |
Re: Hi, Use the below link to know about the connectivity with database using VB, [url]http://www.vbcode.com/Asp/code.asp?lstCategory=Database[/url] Shailaja :) | |
Re: hi, To validate the numeric in the TextBox use :-/ [COLOR="Green"] RegularExpressionValidator control In Properties Specify the control which control to validate in [B]ControlToValidate Property[/B]. In [B]Text Property [/B]Specify any Error Message. [/COLOR] regards :icon_lol: shailu | |
Re: hi, Already Connection is done between VB and Oracle Database and the code is available in the "Code Module" [CODE] Conn.ConnectionString = "Provider=MSDAORA;User ID=scott;Password='tiger';Persist Security Info=False"[/CODE] In your System, Find the User name and password of the Oracle and assign the User name and password in the Connectionstring and then … | |
Re: Hi, Try the below coding, [CODE] Option Base 1 [COLOR="green"]'Set Index of Array start with 0 or 1[/COLOR]Dim i As Integer Dim b() As Integer [COLOR="green"]' Array Variable[/COLOR] Dim Rearrange As Boolean [COLOR="green"]'To Delete the Selected row in the grid[/COLOR]Private Sub cmdDelete_Click() msflxgrid.TextMatrix(msflxgrid.RowSel, 0) = "" End Sub [COLOR="green"]'To Increment … | |
Re: Hi, Try the below coding: [CODE] [COLOR="Green"]'Declare the Variables for Connection and Recordset[/COLOR]Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Form_Load() Set cn = New ADODB.Connection Set rs = New ADODB.Recordset [COLOR="green"]'Open the Connection[/COLOR] cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\shailaja\pract\testing.mdb;Persist Security Info=False" [COLOR="green"]'Open the Recordset[/COLOR] rs.Open "select * from … | |
Re: HI, you can try the coding, this could helpful to u. [CODE] sql="select * from student" if rs.state=1 then rs.close rs.CursorLocation = adUseClient rs.open sql,strcon,3,3 Set DataGrid1.DataSource = rs DataGrid1.Refresh [/CODE] Shailaja:) [QUOTE=electrosoul456;653530]I am using this query sql="select * from student" if rs.state=1 then rs.close rs.open sql,strcon,3,3 while not rs.eof … | |
Re: Hi, 1) You can set the null value for the field by applying the value as [COLOR="Red"] "" [/COLOR] or Not applying the value. 2) Check the Property for the Field a) Required = No b) Allow Zero Length = Yes Shailaja:) [QUOTE=hell_tej;651199]Hi Frends, I m creating an access to … | |
Re: Hi, You can use Like Operator or StrComp Function for Pattern Matching in Array Variable or any other Variable. You can compare the Values like below Given: 1) Bring the Array Values in loop and check the Value like this IF a(I) LIKE "*a*" THEN ----- ----- END IF You … | |
Re: hi, Try below coding: [code] Sub fill2() ' ' fill2 Macro ' ' [COLOR="Green"] Declare the Variables[/COLOR] Dim intRng As Integer [COLOR="green"]'Get the Range of rows from the user[/COLOR] Dim strStart As String [COLOR="green"]'Assign the Starting Range[/COLOR] Dim strEnd As String [COLOR="green"]'Assign the Ending Range[/COLOR] Dim intI As Integer [COLOR="green"]'For … | |
Re: hi, Simply you like to add rows and columns means you can use below code [COLOR="Red"]otherwise explain clearly what is ur need.[/COLOR] [CODE] Private Sub Command1_Click() MSFlexGrid1.Rows = 4 MSFlexGrid1.Cols = 6 End Sub [/CODE] Shailaja:) [QUOTE=veledrom;650435]Hi, How can add 4 rows and 6 columns into MsFlexGrid1 with Command_click event … | |
Re: hi, Store the whole query in string variable and execute. [CODE] SQL = ("create table " & vtblNametxt & " (id varchar2(3), pname varchar2(20), qtyp number(4))") cn.Execute(SQL) [/CODE] Shailaja | |
Re: hi, Use the below coding [COLOR="Green"]Sql Server Connection [/COLOR] Dim con As SqlConnection = New SqlConnection("server=shailu;uid=sa;pwd=;database=master") Try con.Open() Dim cmd As SqlCommand = New SqlCommand cmd.CommandText = "select count(*) from login where username = '" & TextBox1.Text & "' and password = '" & TextBox2.Text & "'" cmd.Connection = con … | |
Re: hi, Try the Below Query: [code=sql]select c.cat_name,sum(pi.item_price * pi.item_qty) as total, c.c_vat_rate * total from category c , purchase p,puchase_item pi,country co,seller s where p.p_id=pi.p_id and c.cat_id=pi.cat_id and total>100 and co.c_id=s.c_id and s.seller_id=p.seller_id group by c.cat_name,c.vat_rate[/code] Shailaja | |
Re: hi, Try the below codings: Sub Macro4() ' ' Macro4 Macro ' ' ActiveCell.Rows("1:1").EntireRow.Select If Not (Selection.Find(What:="vcom#", after:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)) Is Nothing Then Selection.Find(What:="vcom#", after:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate ActiveCell.Replace What:="vcom#", Replacement:="itemNumber", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False While Not (Selection.FindNext(after:=ActiveCell) Is Nothing) Selection.FindNext(after:=ActiveCell).Activate ActiveCell.Offset(0, … | |
Re: hi, Try the below Query: [CODE=sql] UPDATE EMPLOYEE_DISTRIBUTIONS SET ED.DISTRIBUTION_GROUP = PH.DISTRIBUTION_GROUP FROM PAYS_HISTORY PH ,ACCOUNT_HISTORY AH, EMPLOYEE_DISTRIBUTIONS ED WHERE PH.CHECK_KEY=AH.CHECK_KEY AND ED.ACCOUNT_ID=AH.ACCOUNT_ID AND ((PH.CONTRACT_YEAR=2008) AND (AH.TRANSACTION_TYPE='GRS')) [/CODE] Have a Nice day :) Shailaja:) [QUOTE=JRippetoe;578694]I ran a query to find 1)the current distribution group and corresponding account id number and … | |
Re: hi, Your code is right but u had used the [COLOR="Red"]@TABLE_NAME AND @AUDIT_TABLE[/COLOR]. Both the variables are not the Table type so it wont allow to create the table to your requirement. Store the query in a string variable and have to execute. Try the Below Coding: [code=sql] DECLARE @TABLE_NAME … | |
Re: hi, Try to avoid Posting the same. Try Below query: Select CI.name,I.ServiceID,P.packagename,P.duration,sum(p.price),P.price,I.date,I.timeIn,I.timeOut From CustInfo CI, InDate I, PakInfo P Where CI.CustID = I.CustID And I.ServiceID = P.ServiceID and indate.intime>='" & dtpicker1.text & "' and indate.outime<='" & dtpicker2.text & "' group by CI.name,I.ServiceID,P.packagename,P.duration,P.price,I.date,I.timeIn,I.timeOut Order By CI.Name Have a nice day. :) … | |
Re: Hi, Try the below coding: Sub attendance() Dim i, j As Integer Dim inp As Integer For i = 1 To 65536 If Sheet2.Cells(i, 1) = "" Then i = i - 1 Exit For End If Next inp = InputBox("Enter the Staff Number to Check?", "Check Staff Number") For … | |
Re: hi, First Example is wrkg well. Then why you geting the errors Check well. And then for functions owner name is not an optional one, You must define the function name with owner name to execute it. Shailaja:) [QUOTE=Yogesh Sharma;580277][B]FIRST EXAMPLE--[/B]CREATE FUNCTION dbo.myFunction() RETURNS INT AS BEGIN DECLARE @myInt INT … | |
Re: hi, Defaultly Monthview Control date format is "dd/mm/yyyy" then how u getting that format. If the format is like that mean no problem because vb convert the date to "dd/mm/yyy" and then only it do's other process. Shailaja:) | |
Re: hi, Coding is right but the value assigned for the variable 'bottom' is 1. 1 means it takes first row in the excel sheet that row could be a header row that is the column name so that error displays as 'Type Mismatch'. Shailaja:) | |
Re: hi, Actually Frame and picture control is said to "Container Control". Because we can place any controls within that controls. So u place the Image control in Picture Control. Shailaja:) | |
Re: hi, I think you used the [COLOR="Red"] adLockReadOnly[/COLOR] Lock type. So it displays error. If you use the [COLOR="Red"] adLockReadOnly[/COLOR] Lock type then the records are said to be readonly record so it wont allow u to change the values in the record. When you like to manipulation(insert,update,delete) use [COLOR="red"]adLockBatchOptimistic … | |
Re: hi, try below coding to find out the time difference Dim starttime As Date Private Sub Command1_Click() If Command1.Caption = "Start" Then starttime = Text1.Text Timer1.Enabled = True Command1.Caption = "Stop" ElseIf Command1.Caption = "Stop" Then Text2.Text = DateDiff("s", starttime, Text1.Text) Timer1.Enabled = False Command1.Caption = "Start" End If End … | |
Hi, I need to bind the primary column name and table name in one combo box and foreign key column name and table name in another combo box using vb.net codings with access tables. Plz help me its very urgent. thanks alot. Shailu |
The End.