[AccessD] Synchronizing Subform to Main form based on a date

Gustav Brock gustav at cactus.dk
Wed Sep 8 04:56:48 CDT 2004


Hi Donald

Perhaps you need to convert the value from the combobox (which is a
string) to a long as the value for the master field.

[Location], Int([cboCombo2]), ...

/gustav


> I'm pulling my hair out on this one.

> I have a simple main form with two unbound combos, one for a location
> and the other for a date.  The RowSource for the location combo is a
> table that contains a record for each location - pulling the PK in
> column 1 and Name in column 2 from that table.  Column 1 is bound and
> its width set to 0 so that only the name displays.  The RowSource for
> the date combo is a summary query pulling from a transaction table with
> column 1 equal to Int(MyDateFromTrxTable) and column 2 equal to
> Format(MyDateFromTrxTable,"mm/dd/yyyy").  The query is grouped on column
> 1 so that only one row for each date appears.  Column 1 is bound and
> width set to 0 so that only the formatted dates appear.

> I'm having trouble getting a simple subform ([Location], Int([Date]),
> [ItemDetail]) to synchronize with the main form.  Using the location and
> date values, the only way I've been able to get it to work is to expose
> the first column of the date combo by setting its width to something
> other than zero.  Of course, I don't want the date serial number to be
> displayed on the form - just the formatted date.  

> Note that I have restricted both the bound column of the combo and the
> corresponding value in the subform to just the integer portion of the
> date.  Thus, I don't think this is a matter of trying to match a
> "date-only" value against a "date-with-time" value.

> I work with subforms like this all the time, though I don't think I've
> ever attempted to use a date value as part of the link.  Is there some
> esoteric quality of date values that I need to know about here?  Anybody
> have a clue about why this won't work as advertised?

> Thanks!

> Don McGillivray




More information about the AccessD mailing list