List Box like data entry

J

Jeff C

I would like a data entry field on my form to open up just like a
list box does. The data type is short date with an input screen.....The list
would always open up to a black top line where a new date could be entered
and the rows below that would hold any dates entered previously. If someone
can offer direction I can cut and paste code but I really do not know VB.
While it is above my head right now it doesn't seem like a greatly difficult
thing but maybe it is. Thank you.
 
J

John Vinson

I would like a data entry field on my form to open up just like a
list box does. The data type is short date with an input screen.....The list
would always open up to a black top line where a new date could be entered
and the rows below that would hold any dates entered previously. If someone
can offer direction I can cut and paste code but I really do not know VB.
While it is above my head right now it doesn't seem like a greatly difficult
thing but maybe it is. Thank you.

Where's the data stored? If you have multiple dates for each record
then you should certainly have a second table related one-to-many to
this one; and you could then use a continuous Subform, sorted by
descending date, which will look very like a listbox.

John W. Vinson[MVP]
 
J

Jeff C

It really sounds like a continuous subform may work..I have never used one
before. I only would include one field on it. Maybe I should split my table
relationally separating this particular [Date}field in it's own table with an
autonumber primary key...then create the subform based on that two field
table [ID#] and [Date]. Any thoughts?
 
J

John Vinson

It really sounds like a continuous subform may work..I have never used one
before. I only would include one field on it. Maybe I should split my table
relationally separating this particular [Date}field in it's own table with an
autonumber primary key...then create the subform based on that two field
table [ID#] and [Date]. Any thoughts?

If each ID# can have multiple dates, then absolutely: that's the ONLY
way to do it. You cannot, and should not try, to store multiple dates
in one field. Bear in mind a listbox is a *DISPLAY TOOL*; it's not a
data storage medium.

Two suggestions: don't use special characters such as # in fieldnames;
and don't use reserved words such as Date. Access *will* get confused!
Just change the fieldname (avoid blanks in fieldnames while you're at
it).


John W. Vinson[MVP]
 
Top