|
hi
To my knowledge e.g you reference(Access) a function in a certain Class using an Object.
Reference is just a word used in this terms
Hope it helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi guys
i am working with a 3 tier application in vb.net,
i want to use progress bar while i am retrieving data from data base,
i want to display actual prgress regarding retrieving data from data base through progress bar but
i am unable to find the right direction,,
any helping code, link ,
thanks in advance
hello
|
|
|
|
|
|
Since a database action doesn't report progress and can't know ahead of time how many records are going to be returned, you're going to find this quite difficult to do.
You can do this once your code has retrieved the data from the database and your parsing through it for some reason, such as creating an object collection from the returned results.
|
|
|
|
|
Can I format a dateTime picker for month and year only?
How do I do this?
|
|
|
|
|
No - you will need to write your own control.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
AAGTHosting wrote: Can I format a dateTime picker for month and year only?
How do I do this?
Yes, you can... set the Format property to Custom and the CustomFormat property to what ever format string you need.
|
|
|
|
|
hi, please see code below...i keep on get in a "subscript out of range" error for the array v(n), my option base is 0
even if i reset the array to v(n-1) it does not accept. is the something i am missing
Public Function datevec(d1 As Variant, d2 As Variant, freq As Variant)
Dim v()
Dim n As Long
Dim c1, c2 As Date
ReDim v(n) As Variant
If IsDate(d1) = True And IsDate(d2) = True Then
c1 = DateSerial(Year(d1), Month(d1), Day(d1))
c2 = DateSerial(Year(d2), Month(d2), Day(d2))
n = Application.Round(VBA.DateDiff("d", c1, c2) / 365 * freq, 0)
Select Case freq
Case 1
For Each i In v(n)
v(i) = VBA.DateAdd("yyyy", i + 1, c1)
Next i
Case 2
For Each i In v(n)
v(i) = VBA.DateAdd("q", 2 * (i + 1), c1)
Next i
Case 4
For Each i In v(n)
v(i) = VBA.DateAdd("q", i + 1, c1)
Next i
Case 12
For Each i In v(n)
v(i) = VBA.DateAdd("M", i + 1, c1)
Next i
End Select
datevec = v
End If
End Function
|
|
|
|
|
Try moving your ReDim statement bellow the assignment of n like this:
n = Application.Round(VBA.DateDiff("d", c1, c2) / 365 * freq, 0)
ReDim v(n) As Variant
|
|
|
|
|
I am posting this question in VB2005 because that is the front end of my project (Access project.mdb being the back end).
I have a frmEmployees that I am using to populate tblEmployees and would like to create a Trigger to add some data to tblTimeOff whenevr a new employee is added. I am not able to use SQL server at this time. can anyone point me in the direction of any Event in VB2005 that I might be able to use to accomplish my mission? the use of such Triggers will play a major role in my project until I can migrate to SQL server.
TIA
|
|
|
|
|
IvanIT wrote: and would like to create a Trigger to add some data to tblTimeOff whenevr a new employee is added.
Sorry to say, but Access doesn't support triggers, and there is no event that is fired upon a table update. You'll have to implement this entirely in your DAL code.
|
|
|
|
|
Thanks Dave. I was afraid of having to do this through tons of codes, but its what it is. Pretty soon I might as well port over to SQL server.
|
|
|
|
|
Hi All
I am working on VB6 with CR8, in my application i have a save button that will save the data into database and then print a invoice. the data entered is works perfectly the problem is in the report.
When the report prints it always print the half content means it should print 10 records but it always prints the 6 or 7 records. In my query in uses the grouping but the data belongs to the first group will prints only.
Another problem is if i place a msgbox before invoice genration then it prints the invoice correctly
so what would the solution
plz reply
With Regards
Yogesh Agarwal
|
|
|
|
|
It looks like your report gets called before the database update is done... you will need to check that all updates are completed before initiating the report.
|
|
|
|
|
Hi
Thanks for your reply. As you wrote i already check that my database is updated successfully wihout the prob.
And the another thing after database updation i use a msgbox to show the message that Invoice genrated successfully then i go for the receipt printing, now on to message box if i wait for a litle bit time hardly 1 second my receipts prints fine but if i am in hurry then the same problem occurs even when i remove the msgbox then on wait is there to print receipts so it always gives the wrong receipts the database is good because duplicate receipt print the correct one.
plz do reply
Yogesh Agarwal
|
|
|
|
|
yogesh_kumar_agarwal wrote: Thanks for your reply. As you wrote i already check that my database is updated successfully wihout the prob.
And the another thing after database updation i use a msgbox to show the message that Invoice genrated successfully then i go for the receipt printing, now on to message box if i wait for a litle bit time hardly 1 second my receipts prints fine but if i am in hurry then the same problem occurs even when i remove the msgbox then on wait is there to print receipts so it always gives the wrong receipts the database is good because duplicate receipt print the correct one.
As I said, it probably takes a few milliseconds for the database update to finish, before which the report is already invoked... You have illustrated this yourself, when you say that having a message box before the report print works fine.
|
|
|
|
|
I think you are write, because an another fact i just came to know if i print the report directly to the printer (without showing it) it will genrate the correct reports (Receipts). any how could you plz sugges me the way to update database more quickly or any other way by which a user of the application has to wait for a second before printing the receipt.
Yogesh Agarwal
|
|
|
|
|
If you keep the DB updates on a separate thread, you could wait for that to complete before invoking the reporting thread...
|
|
|
|
|
i am asking the same how do i wait my application for a while till my database is not being updated
Yogesh Agarwal
|
|
|
|
|
Hi thanks for all of your replies, Now my problem gets solved.
Yogesh Agarwal
|
|
|
|
|
yogesh_kumar_agarwal wrote: Hi thanks for all of your replies, Now my problem gets solved.
You are welcome.
How about posting what you did to solve it then?
|
|
|
|
|
Hello, I encountered the following problem.
I have 2 forms and 2 textBoxes. Every form has 1 textBox and the program starts with form1. When I press a button, form2 opens and I can start to use it. On form2 is also a button, that needs to put the value from textBox2 on form2 to textBox1 on form1. But it won't do that. What am I doing wrong? I got the following code:
button.click event on Form2
Form1.textBox1.Text = textBox2.Text
|
|
|
|
|
What you're doing wrong is that you're not really understanding concepts of OO. Form1 obviously doesn't contain a reference to the Form1 instance that is running in your program. You're also failing in two other areas:
1 - textBox1 is a dumb name for a variable
2 - it should never be a public variable
This is what delegates are for, set up a delegate that passes the text back to form1, and let form1 update the textbox with that text.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
u need delegates and events
Public Delegate Sub OnSelect(ByVal val As String) 'Create a Delegate outside of the scope of class.
Public Shared Event TextBox2Date As OnSelect 'Code on the Form to create an event of your delegate type
on click event of the button on form2
fire this event
TextBox2Date(textbox2.text)
On form1 handle this event
AddHandler form2.TextBox2Date, AddressOf ShowDatainTextbox1
sub ShowDatainTextbox1 (val as string)
textbox1.text = val
end sub
hello
|
|
|
|
|
I have a DataGridView from which users can preview two different reports via a link column in the grid. Due to lack of space, and to make the grid look better, I'd like to give these two preview columns a single heading. For example, users can click on the Rpt1 column to preview Report 1, or Rpt2 to preview Report 2 but instead of this:
Preview | Preview
Rpt1 | Rpt2
I want it to look like this:
Preview
Rpt1 | Rpt2
Anyone have any ideas of how to accomplish this? I work with VS2005.
|
|
|
|