Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to use a container class object in a Grid column

Status
Not open for further replies.

mbru

Programmer
Mar 12, 2001
8
0
0
US
I have a class that consists of a text box and the ole calendar control. The calendar control is set to visible = .F. The keypress method of the text box contains code to mimic the calendar control, ie., page up goes to the previous month, page down to the next month, right arrow to the next day, left arrow to the previous day, up arrow to the previous week and down arrow to the next week. If the user presses the spacebar, the calendar's visible property is set to .T. and it appears to drop down (mimicking the combo box behavior). Pressing enter closes the calendar (sets visible property to .F. and focus to the text box).

The control works fine in a form, where I set the controlsource of the text box to the desired table/view field. I am now trying to use this control in a grid column. The calendar drops down when the space bar is pressed, but no date appears in the text box.

I have tried all sorts of combinations of controlsource, currentcontrol, bound, sparse, etc. with no luck. Anybody have any ideas why the date doesn't appear in the text box when the control is in a grid column? Any thoughts are appreciated.

mbru
 
I suggest instead of using the container class in the grid, use the Text class only and drop down the Container as an interactive change event and storing the value retuned by the container to the columns Text1 value.

I assume the problem is on the way the current control is applied on the grid. first on Text1 then on the calendar class then again on Text1 and in the process the values are not getting passed. Or as an alternative, the container class shall contain the TextBox also and the Grids Text1 is removed after setting the Container class. The SPARESE be set as .F.

Hope this is helpful to you.
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com

LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top