Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




(Resolved)View Birthday Of The Month In LISTVIEW?


hi! need help i'd like to know how to view Birthday of the Month in Listview...

i have errors here:
"Select *From QueryMusic Where Bday = Month(now)"

i want to view "birthday of the month" when i click radio button(Birthday) and display in Listview....

waiting to your reply.thanx in advance.



Edited by - edd_hills on 7/20/2005 7:02:09 AM




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
ListView Report Mode View - RESOLVED
When I change to report mode view nothing is showing up in my listview. When I change it to List view my data shows up. Any ideas?


VB Code:
Private Sub LoadTableSpecs()        Dim oSQLServer As New SQLDMO.SQLServer    Dim oSQLDatabase As New SQLDMO.Database    Dim oSQLTable As New SQLDMO.Table    Dim oSQLColumn As New SQLDMO.Column        Dim i As Integer    Dim liObject As ListItem        ListView1.ListItems.Clear        oSQLServer.LoginSecure = True    oSQLServer.Connect Form1.cboServer1.Text    Set oSQLDatabase = oSQLServer.Databases(Form1.cboDatabase1.Text)    Set oSQLTable = oSQLDatabase.Tables(Form1.cboTable1.Text)        For Each oSQLColumn In oSQLTable.Columns                Set liObject = ListView1.ListItems.Add(, , oSQLColumn.Name)        liObject.SubItems.Add , , oSQLColumn.Datatype        liObject.SubItems.Add , , oSQLColumn.Length        Set liObject = Nothin        Next    oSQLServer.DisConnectSet oSQLServer = NothingEnd Sub

*RESOLVED* Getting Selected Item In List View To Move Into View*RESOLVED*
Hi, I am trying to get a List View to act like a combo box. At the top of the List View there is a text box where the following code searches the List View for the text entered, I have this code in the Change event of the text box so a search is done on each letter typed.

The code finds the record without a problem but I want it to move to the top or into view. Right now I have to scroll down to find the record it selected. Anyone have any ideas? Here is my code:


Code:
Private Sub txtFindFirst_Change()
Dim i As Integer
Dim l As Long
On Error GoTo NoRecord

If txtFindFirst = "" Then
GoTo NoRecord
Else
l = Len(txtFindFirst.Text)
For i = 1 To lstContacts.ListItems.Count Step 1
If StrConv(txtFindFirst, vbUpperCase) = StrConv(Left(lstContacts.ListItems(i).Text, l), vbUpperCase) Then
lstContacts.ListItems(i).Selected = True
Exit Sub
Else
End If
Next
End If

NoRecord:
On Error GoTo NoList
lstContacts.ListItems(1).Selected = True
strTransferID = lstContacts.SelectedItem.ListSubItems(1).Text
Exit Sub

NoList:
Exit Sub
End Sub


Thanks in advance for any help.

Month View
Hi all
i ma having some problems with month view

how do you use it, ideats guide pleas

i am using VB6 and i have been codeing for some time but this has stumpt me

eny help would be apreshated

Month View
het guy's i'm using month view for example if i press on the montview i want to check that the dateclicked in the montview isn't smaller than the real date there is function to check this or somthing else

thank's for help

Month View
Hi

Using the Month View control, if I pick a date, the next button click doesn't fire. It does the second time though. Any ideas ?

Thanks
Robert

Month View
Hello experts;
Here's something to tease you about. This is what I'm trying to do here, but it's not working. Basicly, I'm trying to load in a file into memory (03/03/02|The Easter Ball|This years Easter Ball is being held at the park|Dan 1955|8450567-0949|). After that, I'm trying to put all these event dates into the calendar bold. Can someone please help me out?



Private Sub Form_Load()

items = 0
place = 1
Open App.Path & "events.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, Item
items = items + 1
lenghtofline = Len(Item)
control = 0
For i% = 1 To lenghtofline
letter = Mid(Item, i%, 1)
If letter = Chr$(124) Then
control = control + 1
letter = ""
If control = 1 Then
eventdate(place) = hold
hold = ""

End If
If control = 2 Then
eventtitle(place) = hold
hold = ""

End If
If control = 3 Then
eventdescription(place) = hold
hold = ""

End If
If control = 4 Then
eventphone(place) = hold
hold = ""

End If
If control = 5 Then
eventname(place) = hold
hold = ""

End If


End If
hold = hold + letter

letter = ""
Next i%


hold = ""
items = items
place = place + 1
Loop
Close #1

items = items - 1

'how do you call the private sub below and then have it come back here?
call MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean)

MonthView1.MonthColumns = 4
MonthView1.MonthRows = 3

End Sub

Private Sub MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean)
Dim i As Integer
i = vbSunday
While i < Count
State(i - MonthView1.StartOfWeek) = True
i = i + 7
Wend



End Sub

Month View
Hi All,
i would like to know is there a way to disable certain days in the month view. I have a table in my database called annual leave, i need the month view to disbale the days in this table so the user can not choose them. I have tried GetDayBold but the user can still choose these days. Any help please thanks Jon.

Month View
hello,

i would like to display only the month view of my record, the date and year must not show. can somebody help me for any links or tutorials. thanks



Edited by - Geof on 6/18/2007 3:47:53 AM

About Display Of Month View
Hi there. Can I use a button/icon in vba to pop up a month view tool in a userform for user to select the desired date?

Cheers.

Month View Question
On the month view thing, there is the "month", you can scroll thru them, and go thru the years too.

I have a couple of questions.

Is there any way to know what month they are on (My program will store data for about a year, but they might need to go back and look and/or change something, so I would like to kno what month they are on so I can show the correct form/ frame.

Also is there any way so they CANT change the year.

And o wait.. im just gonna start a new thread, my progie is really making me mad!!!!

Month View Question
Code:
Private Sub tmrMOUSEOVER_Timer()
Dim Y As Integer

For Y = 1 To 7
If MouseHasLeftObject(frmMain, mv) = False Then
'By adding this IF statement, we stop updating if it is already like it.
If mv.Day = Y Then
mv.ForeColor = vbBlue
Else
If mv.Day > Y Then
mv.ForeColor = vbBlack
End If

End If
End If
Next Y

End Sub

I have a module that detect if the mouse is over on a 1ms timer (so just 1 in the timer thing, not 10 or 100 not 1000, where 1000 = 1 second)

But if I have 1 clicked it is fine (Ohh the mv is a month view) and if I have the date 1 click it is fine, but if I goto 2-7 it looks like there ae frames and little lines go from the top to the bottom.

Anyone know why??

Adam

Help: Month View Control
I need to customize the mopnjth view control to make it so when you click on a certin date:

1. It will highlight that week. (if you click on 3, it would highlight 1-7)

2. To do something when you click on a date (i just need it to show something)

Thanks

Adam

MOnth View Control
I am using Month View control.. Its like a calendar opens..
Then i select a date.. I Only want user to select Mondays..
What i should do.. How i shoulkd disbale other days or hide them?

Month View Problem
Hi, i posted a thread where i was trying to get the value of the input box but it wasn't working correctly. Someone suggested using monthviewpicker instead.

So i am.

However, for some reason the query does not return anything.

In one of the textboxes i am trying to show the recordcount and it returns -1. Also i have to press the command button twice to make it run even though it's just under the onclick event.

The recordset seems empty. I even tried converting to american date format first, same problem. I ran the query in Access and i get no results. I then made a query in Access and tried copying it and no results.

Does anybody know what is wrong?


VB Code:
Private Sub Command1_Click()Set objrs = reportrecord txtnumberofletters.Text = objrs.RecordCount objrs.CloseSet objrs = Nothing  End Sub


MODULE

VB Code:
Public Function reportrecord() As ADODB.RecordsetDim mysql, sstart, send sstart = Format$(frmreports.mvstartdate.Value, "mm/dd/yyyy")send = Format$(frmreports.mvenddate.Value, "mm/dd/yyyy") mysql = "SELECT [15_Letters].* "mysql = mysql & "FROM 15_Letters "mysql = mysql & "WHERE ((([15_Letters].Date)>=#" & sstart & "#) AND (([15_Letters].Date)<=#" & send & "#)) " 'mysql = "SELECT * from [15_Letters] "'mysql = mysql & "Where ((([15_Letters].Date) >= #" & mvstartdate.Value & "#) And (([15_Letters].Date) <= #" & mvenddate.Value & "#))" objrs.Open mysql, objconn, adOpenDynamic, adLockPessimistic Set reportrecord = objrs End Function

GetDayBold Month View
Hi All,
I was wondering if anyone knows how to make days bold from a table in access. I have a table with annual leave dates and i need the month view to bold the dates between 2 date fields in the database, if you understand that. So if annual leave starts on 01/01/2008 to 05/01/2008 i need the month view to bold the days in between. Any help will be appreciated.

Using Month View From Visual Basic
i had use month view for my visual basic project. my project is about advanced booking of hotel room in advanced of 1 week..... for example today is 21st april ...users can click on the month view till 28th of april and other days is unclickable (which means only 22nd to 28th are shaded, others date can't be shade at all)...how am i going to do that?

Date Picker/Month View Tandem
Here is a question that I'm sure is easy to answer, but I can't figure it out.

Anyway I have a month view calendar and an up/down date picker on a form.

I want them to work in tandem. When the month view date is selected it will change the date picker date. And visea-versa, when a date is selected from the date picker the date in the month view will change.

Please help me out.

Thanks,
Steve.

List View PopUp Prob (lvwIcon View) *Resolved*
Hi all,

I have a listview in large icon view (lvwIcon). I have a popup menu displaying some options when the user right clicks an item that is specific for that item.

My question is this -

I want a different popup menu to show when the user right-clicks on a blank area of the listview which would display general options.

In my testing, whenever a blank area is clicked, the selected item is the first item (if none had been selected) or the current selected item (if one had already been selected).

I currently use the selecteditem.text to determine what pop up menu is to be used.


I guess in theory the code might be something like ;


Code:
If lvwMain.SelectedItem = Nothing then
PopupMenu mnuGeneral
Else
PopupMenu mnuSpecific
End If


Any help would be greatly appreciated.

Cheers

Jack

Month(now())***RESOLVED***
VB Code:
Label2 = Month(Now())



i am using this to label my calendar for the current month, and i realize this returns a numeric. is there a way for it to return text like june instead of 6.


thanks in advance annie

Days In Month (Resolved)
hi what is the fastest way of finding the total number of days in the current month?

Finding Last Day Of The Month... *RESOLVED*
This is probably mind-numbingly simple, but I'm stumped...

I'm writing a program that needs to know the last day of the month for the given date. I need a function that I can pass in any date (e.g. 10-15-2002) and get the last day of the month (e.g. 10-31-2002). Any ideas?

Thanks in advance.

Save A File Once A Month ***RESOLVED***
A new problem appeared:

I can't assure, that my app will run every day, so I have to inquire, if we are in a new month or sth. like that and then save the existing file with a new name...

plz help a little VB-n00b

|proud to be a devil|

[Not Resolved]Searching For Current Month?..pls See Attached Picture
i need help in searching current month..
I have tables in Access; budgetdetails and MyDate...

budgetdetails:
name, date,salary, expenses....etc...


in my MyDate i have: 'combo box
1. january
2. february
3. march
4. april ........up to december.

I have form with listview displaying the budgetdetails. and i have combo box loaded with MyDate table.

what i need is when i click the combo box it will display the current month in listview.
how can i do that?

here's the code i did:

Dim intintdex As Integer



strsql = "Select *from budgetdetails where month(ddate1) = " & Combo1 & ""
Set rs = New ADODB.Recordset
   rs.Open strsql, connectstring()
   
lstvw1.ListItems.Clear

For i = 1 To lstvw1.ListItems.Count
        lstvw1.ListItems.Remove 1
Next i




While Not rs.EOF

    intindex = intindex + 1
    lstvw1.ListItems.Add , , rs("BudgetId")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("dtdate1"), "mmmm dd,yyyy")
    lstvw1.ListItems(intindex).ListSubItems.Add , , rs("Name")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("Income"), "Standard")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("AddIncome"), "Standard")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("TotalActive"), "Standard")
    lstvw1.ListItems(intindex).ListSubItems.Add , , rs("Desc")
    lstvw1.ListItems(intindex).ListSubItems.Add , , rs("Category")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("SalaryExp"), "Standard")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("DescCost"), "Standard")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("tithes"), "standard")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("TotTithesSav"), "standard")
    lstvw1.ListItems(intindex).ListSubItems.Add , , Format$(rs("Netsalary"), "Standard")

    rs.MoveNext
Wend
  

End Sub



Edited by - edd_hills on 8/3/2005 7:36:49 AM

How Can We Change The Control Of Day's In A Month View/Calendar Control
hi,
how can we change the control of day's in a Month view/Calendar control.

example:first week should have red colour
second week should have green colour.

Birthday
hi, how can i tell if its someones birthday?

i have the date of birth 00/00/0000, and i have todays date, i want to know if they match. i could use the left() function to see if the day and month match but.... i have a time shift thing on it for timezones. i have a sub that will need to take the time and add or take the correct amount of hours, then if it goes to another day, it needs to adjust the date.

any ideas how i can do the timeshift AND the birthday subs?

i know i can use the datediff() function but im not quite sure how to go about it, i need the timeshift result to be in the same format as the now function

Days Until My Birthday
How do I work out how many days until my birthday, assuming I was born 29/3/68.

I tried this, but it gave me 1292
print DateDiff("d", Format(Date, "ddmm"), Format(.Fields!dob, "ddmm"))

Part of the problem may be with my date format - I use dd-mm-yy.

Birthday Reminder
Hi friends!

I have average knowledge of VB. I want to write a VB program code where one reminds me the birthday of my friends.But I need this as a background process where the program reminds me atleast 5 times in a day.I mean that I should not execute the program everytime to check whether I have missed anybody's birthday.I should be reminded/alerted when the system is logged in.Please help me or suggest me how to do this.Please also suggest if there is any similar program,like Bills Payable reminder.

Thanks in Advance
Aravind

Calculating Age Last Birthday
Does anyone out there have a simple function or procedure that can calculate someone's age given their date of birth and the current date?

I would really appreciate.

Thanks

Tesita

Same Birthday Problem
the problem is to randomly choose birthdays for 25 people.
when you click a command button, it should randomly generate
and test for coincidence (two or more people having the same
birthday). birthdays (1 to 365) are displayed in a control array
of 5 by 5......

Second part of that is to run the experiment for a 100 times
and the number of times coincidence occurred is counted. another
text box should display the fraction of times coincidence occurred
(as a percentage)

As you probably noticed I am having so much trouble learning this
stuff. I never thought that programming was that hard. could you guys
give me some tips on how to study?..midterm is coming up...huuu..
once again thank you guys for helping me out..

judy,

Birthday Problem
can you guys help me out?
thanks.

1.one command button, which when pressed, randomly generates and tests for coincidence (two or more people having the sasme birthday). The birthdays (integers from 1 to 365) are displayed in a cotrol array of 5 by 5 (either consisting of text boxes or labels)
2. a text box which displays 1 if two or more people have the same birthday, and 0 if no birthdays coincide.
3. antother command button, which when pressed, runs the experiment (of generating randomly birthdays for 25 people, and checking for coincidence) for a total of 100 times. the number of times coincidence occurred is counted.
4. another text box which displays the fraction of times coincidence occurred(as a percentage)

i have found a way to create 25 boxes when run, but i don't know how to generate random number and show them in boxes. and check for coincidence.........

A Happy Birthday App!
A friend of my has birthday and I want to make a app for her, just to describe her! Any ideas??????
Please help me or I will jump over a bridge!!!

Happy BirthDay
Hi, today it was exactly 52 years ago I was born in this very sunny west side of Argentina.
Please Congratulate.Me
P.S. Any other old guy around?
(But young in spirit...)

Happy BirthDay
Hi, today it was exactly 52 years ago I was born in this very sunny west side of Argentina.
Please Congratulate.Me
P.S. Any other old guy around?
(But young in spirit...)

HELP: Solution For Posted Date The 15th Of The Month OR 1st Of The Following Month
Hi guys

could you help what would be the best way to implement this logic

Example
If ToDate is May 14 2008 then posted date is 20080515
and if ToDate is May 31 2008 then posted date is 20080601

Basicly I would like to create a logic that would work like this
ToDate = 20000114 THEN PostedDate = 20000115 <-- The 15th of the same month

ToDate = 20000131 THEN PostedDate = 20000201 <-- The First of the following month

ToDate = 20001231 THEN PostedDate = 20010101 <-- The year Change (The first of the following month and year)



Thank you

User Choose A Month And I Find Out How Many Days In That Month
Hi guys,
I have a combo box with the 12 months of current year. Eg, January, February, etc, etc. (not in number 1-12)
Now, once the user chooses any month I have to find out how many days are in that month, and
first and last day of that month.

The problem is that I don't have the date, all I have is january to december.

Can you help me please?

thank you very much!

Olivia




 

***RESOLVED***ListView / How To Select A Row From 2 Seperate ListView Controls
I have 2 ListView controls on a form. I want the user to be able to highlight a row in both ListViews. The problem is when the user selects (highlights) a row from ListView1, as soon as ListView2 is clicked the row selection (highlight) made in ListView1 disappears.

Thx

VB View **Resolved**
This is a really basic question but...


When i open my vb project the windows have came apart! i.e the properties window is separate from the project window, the form window is separate and the design is out on its own too!

How can i glue them all back together again like the way it used to be - as default?

Birthday Problem. URGENT
Hi all

I have database in Access with table clients. What I need is SQL query that selects name, surname from clients where birthay = today

Please help me. I've spend last 2 days on this one.

Happy Birthday To Me - My Time
Hello Friends,

Happy birthday to me !



It is my time today, so I'll ask about time functions

*****************
question 1 = How to determine this moment if it is in morning or evening ?

question 2 = How to change the time from 12 to 24 or vice versa?

Birthday Comparison To Date
Hello to everyone.

I'm doing a small program which when loads compares a persons birthday with todays date.
If within the birthday is within 7 days before tofays date I get a msgbox warning me. ( I'm a shocker with remembering birthdays, anniversaries etc..)

Is there a simple way of doing this?

I have a database of 'important' birthdays,etc.. Loop through the recordset, if within 7 days display message box.

My first idea was to convert the 'day/month' part to a long value
ie:

Dim DateBirth As Long
Dim Pos As Integer
Dim DateNow as Long

' Convert date to long value for comparison
Pos = InStr(4, DateBirth, "/", vbTextCompare)
DateNow = CLng(CDate(Left$(CStr(DateBirth), Pos - 1)))

Pos = InStr(4, Date, "/", vbTextCompare)
DateNow = CLng(CDate(Left$(CStr(Date), Pos - 1)))

If (DateNow-DateBirth) > 0 and (DateNow-DateBirth) > 7 then MsgBox " Buy a Bloody Present."

This works fine until the Birthday is the 24/12 - 31/12


Cheers in advance

Listview &amp; Tree View
I have a Tree view and a List view. I have designed something like Windows Explorer. What i want to do is to be able to resize them by using Mouse inbetween the Treeview & Listview.

Please advise.

Can Anyone Help Me? ListView To View The Database
CAn anyone help me? can i used the listview to view a database?

View Thumbnails In Listview ?
Can you view the thumbnails of a Dir picture contents in a listview control or any other control for that matter ?

Help About ListView Report View
How can I add a new item to a particular column in report view? For example I have a columns named First and Second, I want to add an item to the Second column and not in First. Please tell me how. Please. Please. Please.

&lt;?&gt; Listview Icon View
Code:
'question:
'I load my listview and I use 2 different icons
'one for odd numbers, one for even. No Problem
'
I can then view my listview by LargeIcon,SmallIcon,List,Report
No Problem
However, when viewing largeicon I only get one icon
All the rest show me the 2 different icons.

There obviously is a reason...someone what to impart
that bit of knowledge on me.

'load an array with information
Dim myArr(99)
Dim i As Integer
For i = 1 To 99
myArr(i) = CInt(Rnd * 99)
Next i

'then load the array into a listview

Dim x As Variant 'differ between odd and even rows

For i = 1 To 99
'used different images every second line
'image one for odd, image2 for even
x = i / 2
If x Like "*.*" Then
Set sItem = Listview1.ListItems.Add(, , myArr(i), 1, 1)
Else
Set sItem = Listview1.ListItems.Add(, , myArr(i), 1, 2)
End If
'add subitems
sItem.SubItems(1) = "905-444-9455"
sItem.SubItems(2) = "who knows"
Next i

Listview: View An Item On The Top
Hi vbFriends !!!

I have a ListView control (Report mode) and it has a lot of items.

When I search for an item and use EnsureVisible method, it usually happens that the item is shown as the last item in the listview's area.

I would like the item to be shown on the top of the listview's area, so that is much more comfortable for the user to see it.

Any hint that could help me?

Thank you in advance !!!

P.S.: here's an example:

My ListView:
-------------------------------
| 1 |
| 2 |
| 3 |
| 4 |
|found item shown here|
-------------------------------

But:
-------------------------------
| I want it here ! |
| 6 |
| 7 |
| 8 |
| 9 |
-------------------------------

List View (RESOLVED)
Can anybody help me out i'm having a few problems with my address book. The problem is on frmDisplay can you help me display each record in a list view with everything in it. I have also attached my code for you to take a look at

Resolved :List View
i wanted to have a picture or icon in the list view with every row
how can do this

How To View A Web Page In VB(RESOLVED)
hi,
Am a beginner in Visual Basic. Would u kindly tell me how can i view a web page in my VB application . Please get me the code and the controls if any needed in Detail.Pls help me
Thanking you in Advance
Stanly

Copyright © 2005-08 www.BigResource.com, All rights reserved