473,395 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

searching fields and displaying feilds with data

He is what i am trying to do. I have a sql server 2005 express and im building a program with VB6. I have a form that people use to enter data into the data base. Its entered by the date, and there is a notes field. What i want to do is get the notes for only days that have notes as not all days in a month would have notes. How can i search through by date and retreive only dates with notes? the best easiest way.
eg
fldDate = 01/01/08 fldNotes = "blank"
fldDate = 01/02/08 fldNotes = "some note here about the day"
fldDate = 01/03/08 fldNotes = "blank"

check to see if there is any notes for month of january, 2008 if there is notes unhide view notes button, click on veiw notes button and populates a "whatever would be best" to view all notes on a form.
IE
01/02/08 - some note here about the day


any ideas on this would be greatly appreciated :) thanks in advance
Aug 24 '08 #1
1 909
Delerna
1,134 Expert 1GB
something like this for displaying the notes
Expand|Select|Wrap|Line Numbers
  1.  
  2. create proc prListNotes @Mth int,@Yr int
  3. as
  4. select yourfields
  5. from thetable
  6. where month(fldDate)=@Mth and year(fldDate)=@Yr and fldNotes<>'blank'
  7. go
  8.  
call it from your front end something like this
Expand|Select|Wrap|Line Numbers
  1. set recordsetOBJ=conectionOBJ.execuste "EXEC prListNotes 1,2008"
  2.  
you would also know to unhide the button by the fact that there are records or not in the recorset object.

Hope it helps
Aug 25 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: J P Singh | last post by:
Hi All I have been given the task to create a search page to search on of the tables in the sql database. I have been asked that the user should be able to search any field(which I have done)...
10
by: sffan | last post by:
I am new to database programming and was curious how others solve the problem of storing encrypted in data in db table columns and then subsequently searching for these records. The particular...
3
by: shumaker | last post by:
I was curious... Is there a way to select distinct on a combination of some fields and the for each record returned also get the other fields of an arbitrarily chosen record matching the fields...
26
by: julien | last post by:
Hello, I don't know when to use fields and when to used properties. It looks to me that using properties is always better. But I guess fields must be better in some cases, otherwise they wouldn't...
11
by: TheDataGuy | last post by:
Using MS ACCESS 2002 I developed a FORM, and within that FORM, I created and added a SEARCH BUTTON, and then I created a SUB-FORM, so that when an the END USER clicks on the FORM it will POP-UP...
5
machinex757
by: machinex757 | last post by:
Hello, I have a form that I need to submit to the database. It's mostly checkmarks to submit to the database but it only submits all feilds and not just the ones checked off, filled out. Below is...
3
by: mycall | last post by:
I had a quick look but couldnt find much on this. What i have is a contiunous form with each row having an 'edit' button. By default all feilds have been set to disabled to stop the user...
2
by: punitshrivastava | last post by:
hello friends, i m working in php .i wsnt to know about feild validations .As i want to select data from combobox .according to that selected data feilds is to be editable Say for example : In...
1
by: billa856 | last post by:
Hi, My project is in MS Access 2002. In that I have one Form which enter data in two different Tables, when I click on Submit Button it will run two diffrent queries one by one. Now I want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.