473,326 Members | 2,128 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,326 software developers and data experts.

.Net VB Problem with adding data to a datalist from drpdown field

5
Hi please can someone help,
I am having a problems displaying data from an access db to a datalist. I have a dropdown field that has a list of areas and when an area is selected it looks up all the data for that area and displays it in the datalist.

I realise that its my sql code, but being new to this have no idea what I have done wrong. This is my varible is stParish.

Dim stSelect As String
Dim stFrom As String
Dim stWhere As String
Dim stParish As String

stParish = drpParish.SelectedValue

stSelect = "SELECT Format(tbl_events.startDate, 'dd MMM yyyy') As DateStart, Format(tbl_events.endDate, 'dd mmmm yyyy') As DateEnd, tbl_events.eventTitle, tbl_events.eventDesc, tbl_events.Venue, tbl_events.Parish, tbl_events.contactName, tbl_events.contactNumber, tbl_events.contactEmail, tbl_events.webAddress "
stFrom = "FROM tbl_events "
stWhere = "WHERE tbl_events.Parish = " & stParish


Thank you
Feb 1 '08 #1
1 785
kenobewan
4,871 Expert 4TB
The first thing I notice is the formatting - dd MM yyyy. What is the error?
Feb 1 '08 #2

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

Similar topics

5
by: Phillip | last post by:
Hi. I hate the way one has to jump through countless hoops to put data in a db and get it out again. The straightforward MySQLdb Interface requireing this SQL stuff being a point in case (against...
1
by: Mike Malter | last post by:
I take it that the only way to add rows to a DataList control is through DataBind? If not, how do I manually add rows to a DataList control? I have searched everywhere and can't find an example...
0
by: pei_world | last post by:
I am using the following code to configurate my datagrid and load data from my Pocket Access Database. however, I got some more row extra, and it is the number I setted with my object array in my...
1
by: Chris | last post by:
I would like to know how to display data column for a single record contains many fields. Likes the first row shows first 5 fields, 2nd row show next 5 fields, etc... I tried to use datagrid,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.