Ravi Singhal 0 Newbie Poster

Hi all,
My query is that
I have some tables in MsAccess. Using that tables I want to create some more table by putting some query. (Like I want to merge two table in a single table.)
How it is possiple by using VB6.

Ravi Singhal 0 Newbie Poster

Hi all,
Myself Ravi Singhal. I am just of 22year old. I lives in India in New Delhi. I am working in RMSI from past 6month. There I am working as a VBA developer. If I will face any problem in my working. I will share it with you people.
Hope help from ur side.
Thanx

Ravi Singhal 0 Newbie Poster

hello sir,
Myself Ravi Singhal and I am a VBA developer in India. Can you assist me in my one problem in vb.net

Ravi Singhal 0 Newbie Poster

hi all,

I want to create addIn in vb.net. I have created it in VBA before it. what step have to take. Can any body help me out..

Thanks alot

Ravi Singhal 0 Newbie Poster

hi ,
i am writing a programme in vb6. I want to check whether my cities are matching with cities in database.
so i want to ask that how to pass a array to a database by query.
I have written the following code please help me

Dim CITYARRAY(5) As String
CITYARRAY(0) = "MIAMI"
CITYARRAY(1) = "FRED"
CITYARRAY(2) = "INDIAN HILL"
CITYARRAY(3) = "MARTINSVILLE"
CITYARRAY(4) = "MARY"

Dim connection As New ADODB.connection
connection.Open ("Provider =Microsoft.Jet.OLEDB.4.0;Data Source =L:\RDES Training\Geocode World RL6.0\USGEO.MDB;PERSIST SECURITY INFO = FALSE")
Dim QUERY As String
QUERY = "SELECT CITY FROM USCITY WHERE CITY IN ('" & CITYARRAY & "') "
Dim RECORDSET As New ADODB.RECORDSET
RECORDSET.Open QUERY, connection, adOpenDynamic, adLockOptimistic

Ravi Singhal 0 Newbie Poster

Hi,
Liabrary fuction is fuction which are already compiled and stored in a
perticuler folder so that we can use is further, and system call is made by compiler.
System call is made by compiler to the operating system. whenever compiler face some problem to compile prolem it calls to OS for help
that is we call System call.

thekashyap commented: WRONG. "When compiler faces problems, it calls OS for help" !!???? +0
Ravi Singhal 0 Newbie Poster

I M A Girl Reading A Degree At A Local University , I M Having A Assignment To Do Please Help Me On That Fact

Plz give detail of your assingnment so that we can help u

Ravi Singhal 0 Newbie Poster

hey guys i got this iece of code on a program i am writing, and i was jus twondering if you could help me to convert it so it uses the conditional operator to make it into a 1 line code,

cheers

int total, start, stop, increment;
 
if (total <= start)
    increment = 0;
else if (total >= start && total < stop)
   increment = total - start;
else
   increment = stop - start;

cheers again

Your can replace it by simple line
increament=total<=start ? 0 : (total >= start && total < stop) ? total - start : stop - start;

Ravi Singhal 0 Newbie Poster

Hi everyone
I want to insert flexgrid control in vb.net. But there is no such tool to add it. See I dont want to add datagrid bcoz it dosenot allow to take input from user. I need MSFlexgrid just like in VB6.
can anybody help me.
Thanks in advance

Ravi Singhal 0 Newbie Poster

Good day!

I have a problem in changing a properties of a control in class module. I want to put it in a function so that every now and then I can call it. Could anyone help me how to change it!

Thanks in advance!

Plz give the detail about ur quetion.Which property u want to change and of what control. I think than I may help you
Bye

Ravi Singhal 0 Newbie Poster

Hi,

1 )

I must take a back up of a access data base daily and store in my desktop.

Please give me coding to copy the access data base from the c drive and to paste in my desktop.

Every time when i save the access in my desktop it should save in a different name has names with same file cannot be saved.

2)

Please give coding to save ,close all files , application and then to shut down the system.

hi,
Use can use this coding for your first quetion

Dim file As String
For Each file In Directory.GetFiles("c:\", "*.mdb")
Dim filename As String = Mid(file, 3)
FileCopy(file, "C:\Documents and Settings\Administrator\Desktop" & filename)
Next

you have to use path of desktop rather then red text and you can use filename according to you
I have no idea about your second quetion.

Ravi Singhal 0 Newbie Poster

Hi, Can somebody help me
I am creating a macro in excel and I want to take input from user.
user can give address of any column,row,cell and may be insert perticuler value.and after that I work on that data and response Excel User.
Thanks in advane

Ravi Singhal 0 Newbie Poster

lstUsers.Clear()
lstUsers.View = View.Details
lstUsers.Activation = ItemActivation.TwoClick
lstUsers.Columns.Add("First Name", 100, HorizontalAlignment.Center)
lstUsers.Columns.Add("Last Name", 100, HorizontalAlignment.Center)
lstUsers.Columns.Add("Email", 100, HorizontalAlignment.Center)
lstUsers.Columns.Add("Job Title", 100, HorizontalAlignment.Center)
lstUsers.Columns.Add("Mobile No", 100, HorizontalAlignment.Center)
'lstUsers.Columns.Add("People Involved", 100, HorizontalAlignment.Center)
Dim cnn As New OleDbConnection
Dim da As OleDbDataReader
Dim cmd1 As New OleDbCommand
cnn.ConnectionString = "Provider=Microsoft.JET.OLEDB.4.0;DATA SOURCE=c:\ApptDB.mdb"
cnn.Open()
cmd1.Connection = cnn
cmd1.CommandText = "select confirstname,conlastname,conemail,conjobtitle,conmobilenum from continfo where conusername = '" & anc & "' order by confirstname asc"
da = cmd1.ExecuteReader()
Do While da.Read
Dim itmp1 As New Windows.Forms.ListViewItem(da.GetString(0), 0)
Dim itms2 As New Windows.Forms.ListViewItem.ListViewSubItem(itmp1, da.GetValue(1))
Dim itms3 As New Windows.Forms.ListViewItem.ListViewSubItem(itmp1, da.GetValue(2))
Dim itms4 As New Windows.Forms.ListViewItem.ListViewSubItem(itmp1, da.GetValue(3))
Dim itms5 As New Windows.Forms.ListViewItem.ListViewSubItem(itmp1, da.GetValue(4))
itmp1.SubItems.Add(itms2)
itmp1.SubItems.Add(itms3)
itmp1.SubItems.Add(itms4)
itmp1.SubItems.Add(itms5)
lstUsers.Items.Add(itmp1)
Loop
cnn.Close()


i need to fix the (order by statement) to have the names alphabtically

Hi

Use the following

cmd1.CommandText = "select confirstname,conlastname,conemail,conjobtitle,conmobilenum from continfo where conusername = '" & "anc" & "' order by confirstname asc"

just use quote sign with "anc"

Ravi Singhal 0 Newbie Poster

hi..
i have problem...which i don;t know how to perform this action..
i have a page...named "preview.aspx". this page should preview all the Question with their Answer List
example of Question: What is the temperature of boiling water?
example of Answer : 100 degrees Celcius, 120 degrees Celsius, 80 degrees, and so on....

i can managed to view all the question in the preview.aspx using the data reader..
but i have problem to call the Answer List. b'coz i've created different user control file (.ascx) for different type of question...for example: if user want to view their set of question with radio button for question 1..then it will call Set1.ascx....if want to view answer in drop down list, call Set2.ascx

huhu..how to call the .ascx files?

please somebody help!!

Hi Shiwani

I am telling u to add a single control u can do the same for other.
Let the control name is Set1.ascx and u have to add this control in the file preview.aspx then then write the following code to HTML tag of preview.aspx
'In the begning of page
<%@ Register TagPrefix="UserControl1" Tagname="Preview" Src="Set1.ascx" %>

' in between the <form> tag
<Usercontrol1:Preview id="set1" runat="server"></Usercontrol1:Preview>

It will work fine.
Bye

Ravi Singhal 0 Newbie Poster

i use thsi code for timer , but it shows the messagebox 50 times.. i just need the mesage box to be showed once only

Dim conn As New OleDbConnection
Dim dap As OleDbDataReader
Dim cmdb As New OleDbCommand
conn.ConnectionString = Provider=Microsoft.JET.OLEDB.4.0;DATA SOURCE= c:\ApptDB.mdb"
conn.Open()
cmdb.Connection = conn
cmdb.CommandText = "select apdate from add1"
dap = cmdb.ExecuteReader()
Do While dap.Read
If dap.GetString(0) = Now.Date Then
MessageBox.Show("hi people ")
Timer1.Stop()

End If
Loop
conn.Close()

Hi
I have seen your problem and came to conclusion that the time interval is very low and before u click on first messge ("hi people")
the second messege coming again.
so you can do to things.
First increase the time interval of timer by 10000. and click on messege whenever messege came. or
Your can replace your codig by following
Dim conn As New OleDbConnection
Dim dap As OleDbDataReader
Dim cmdb As New OleDbCommand
conn.ConnectionString = Provider=Microsoft.JET.OLEDB.4.0;DATA SOURCE= c:\ApptDB.mdb"
conn.Open()
cmdb.Connection = conn
cmdb.CommandText = "select apdate from add1"
dap = cmdb.ExecuteReader()
Do While dap.Read
If dap.GetString(0) = Now.Date Then

Timer1.Stop()
MessageBox.Show("hi people ")

End If
Loop
conn.Close()

you have to replace just these two lines. I am sure it will work well.
bye


Ravi Singhal 0 Newbie Poster

My options in my combobox are added from my mdb database... what I need is for each time my form, or program for that matter loads is to have the selected option default to the option that was last selected. So essentially, I need my combo box to "remember" which record was the last one selected by the user. Can this be done, seems like it should be simple but I haven't been able to find the answer.

Hi
I have used vb.net2002 to solve ur problem I hope it will work.
I have used button to show previous selection u may use another thing according to you. The coding is following

Dim Previous As Integer = 0
Dim Current As Integer = 0
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Previous = Current
Current = ComboBox1.SelectedIndex
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox(ComboBox1.Items(Previous))
End Sub