I have a Table with a 'Dates' Field as the primary key and 20 other Fields of Integer Type. This is the Master Table with 9 other Detail Tables all with a 'Dates' key field. I have a form to view all this and it works fine.
My problem is to select the row of the Master Table with a date selected by a DateTimePicker Component instead of having to click through lots of rows until I get to the required date.
I have tried all sorts of ways but cannot get close - I have no sample code because nothing I have tried works for me !!
I feel a right idiot because it must be very simple to do it.
Please help !!!
goldfish999
0
Newbie Poster
Recommended Answers
Jump to PostDid you try databinding?
DateTimePicker1.DataBindings.Add( "Value", MasterTable, "Dates" )
I don't think that'll work very well though. If you pick a date that isn't in the table, you'll probably get an exception. How about using a combo box instead of a date time picker? That makes more …
Jump to PostI see the datetimepicker does not have 'DataSource' and 'DisplayMember' properties.
I don't think they make sense for the date time picker. There's probably a few ways you can define them for the control, but I can't think of any that make a date time picker the better choice than …
All 5 Replies
Hamrick
150
Posting Whiz
goldfish999
0
Newbie Poster
Hamrick
150
Posting Whiz
goldfish999
0
Newbie Poster
Hamrick
150
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.