PDA

View Full Version : Forms/windows or whatever it's called



chamster
09-06-2007, 02:45 AM
I'm done building the computational core of the presentation i've been working on. Great! Now i'd like to enchance user input. Basically, there will be the following parameters involved.
1. String (to be picked from a list of eleven different strings)
2. Date (two dates)
3. Integer (two integers)

I'd like to see some suggestions on a neat way to present such input.

rory
09-06-2007, 04:32 AM
A userform with a combobox or listbox for 1, and two sets of option buttons for 2 and 3, unless you are likely to add more options to these later, in which case combo/list boxes might be more appropriate.

chamster
09-06-2007, 05:04 AM
Can you elaborate regarding option button for dates? I'm going to enter two entities on form

2007-07-12 or perhaps 2007-07-12 00:00:00

How do i manage the issue with option buttons?

rory
09-06-2007, 05:39 AM
You would add the two dates as the caption for the option buttons, then your code checks to see which one is true and acts accordingly.

chamster
09-06-2007, 12:44 PM
Oh, i see! I was apparently unclear. The setting is not one date out of a pair of dates. It is a pair of dates. Perhaps the following will make it clearer. The first date is supposed to describe start of the period to be regarded in the database, while the other date denotes the end of that period.

So, a setting of:
FROM: 2007-05-13 UNTIL: 2007-07-22
is as valid as
FROM: 2007-06-19 UNTIL: 2007-06-30

By other words, i'd like the users to pick dates in a neat, nice way.

rory
09-07-2007, 02:48 AM
Ah, got you now. I would use 6 controls for this. A combobox for day, a combo for month and a textbox for year, then the same again for the other date.

mdmackillop
09-07-2007, 01:00 PM
or you could add a calendar control (see additional controls)
Private Sub Calendar1_Click()
If TextBox1.Text = "" Then
TextBox1 = Calendar1
Else
TextBox2 = Calendar1
End If
End Sub

rory
09-07-2007, 01:06 PM
As long as you and all users have MS Access installed.

mdmackillop
09-07-2007, 01:10 PM
I didn't know it came from Access. Thanks Rory

rory
09-07-2007, 02:07 PM
Yup, it's annoying! As far as I know, the version from 97 was the last one that was freely redistributable.

malik641
09-07-2007, 03:41 PM
As long as you and all users have MS Access installed.
Wow. That's some good info right there. Thank you, Rory :)