| re: Different type conversion A2k and A97 ?
"Lyle Fairfield" <lylefairfield@aim.com> schreef in bericht news:1134564873.586426.56740@g47g2000cwa.googlegro ups.com...[color=blue]
>
> Arno R wrote:
> [color=green]
>> Problem seems to be that Access does not understand the values in the unbound form.
>> Access complains about type conversion errors.
>> When I look at the query in design view and switch the view to the records to be appended I see strange characters like = in the datagrid.[/color]
>
> It woud be helpful if we knew how Access is being asked to "understand"
> the values in the unbound form and when and what types of values. A few
> lines of code could show this?
> [color=green]
>> Any comments? No corruption here AFAIK.[/color]
>
> All data on form are strings, series of bytes. Access magically or
> wickedly, depending upon the situation and your point of view, may
> treat these as someting else: numbers, booleans, blobs whatever.
> As Access and VBA progress they seem to merge more of their
> functionality with unicode. This can cause some things we have designed
> to self-destruct. Where our work expected one byte previously it is now
> getting two.
> This may have nothing to do with your problem whatever, of course,
>
> More information would help me to understand.[/color]
Hi Lyle,
This is about an order form for shoes... (from one shop to another).
As I said I use an unbound form (FrmKlantenBestelling) to collect orders.
I use the values from this form in an appendquery like:
INSERT INTO TabKlantBestelling ( Besteld, WinkelVan, WinkelNaar, Categorie, Artikelnummer, 0, 35, [35+], 36, [36+], 37, [37+], 38, [38+], 39, [39+], 40, [40+], 41, [41+], 42, [42+], 43, [43+], 44, [44+], 45, [45+], 46, [46+] )
SELECT Date() AS Mutatiedatum, [Forms]![FrmKlantenBestelling]![VanWinkel] AS VWinkel, [Forms]![FrmKlantenBestelling]![NaarWinkel] AS NWinkel, [Forms]![FrmKlantenBestelling]![Categorie] AS Cat, [Forms]![FrmKlantenBestelling]![Artikelnummer] AS Art, [Forms]![FrmKlantenBestelling]![0] AS 0, [Forms]![FrmKlantenBestelling]![35] AS 35, [Forms]![FrmKlantenBestelling]![35+] AS [35+], [Forms]![FrmKlantenBestelling]![36] AS 36, [Forms]![FrmKlantenBestelling]![36+] AS [36+], [Forms]![FrmKlantenBestelling]![37] AS 37, [Forms]![FrmKlantenBestelling]![37+] AS [37+], [Forms]![FrmKlantenBestelling]![38] AS 38, (this goes further ..... until 46+)
I have combo's to select Categorie, Artikelnummer, ShopTo and ShopFrom and controls for the values 35, 35+, 36, 36+ .......46, 46+ (these values mean the size of the shoes, numbers from 1 to 5 are entered in the fields)
With Acces97 this worked for years without any problem.
After conversion (I had to convert the app for other reasons) to A2K, it does not work like this ONLY if I add the types (parameters) in the query like:
PARAMETERS [Forms]![FrmKlantenBestelling]![VanWinkel] Text ( 255 ), [Forms]![FrmKlantenBestelling]![NaarWinkel] Text ( 255 ), [Forms]![FrmKlantenBestelling]![Categorie] Short, [Forms]![FrmKlantenBestelling]![Artikelnummer] Long, [Forms]![FrmKlantenBestelling]![0] Short, [Forms]![FrmKlantenBestelling]![35] Short, [Forms]![FrmKlantenBestelling]![35+] Short, [Forms]![FrmKlantenBestelling]![36] Short, [Forms]![FrmKlantenBestelling]![36+] Short, [Forms]![FrmKlantenBestelling]![37] Short, [Forms]![FrmKlantenBestelling]![37+] Short, [Forms]![FrmKlantenBestelling]![38] Short, ....... ;
INSERT INTO TabKlantBestelling ( Besteld, WinkelVan, WinkelNaar, Categorie, Artikelnummer, 0, 35, [35+], 36, [36+], 37, [37+], 38, [38+], 39, [39+], 40, [40+], 41, [41+], 42, [42+], 43, [43+], 44, [44+], 45, [45+], 46, [46+] )
SELECT Date() AS Mutatiedatum, [Forms]![FrmKlantenBestelling]![VanWinkel] AS VWinkel, [Forms]![FrmKlantenBestelling]![NaarWinkel] AS NWinkel, [Forms]![FrmKlantenBestelling]![Categorie] AS Cat, [Forms]![FrmKlantenBestelling]![Artikelnummer] AS Art, [Forms]![FrmKlantenBestelling]![0] AS 0, [Forms]![FrmKlantenBestelling]![35] AS 35, [Forms]![FrmKlantenBestelling]![35+] AS [35+], [Forms]![FrmKlantenBestelling]![36] AS 36, [Forms]![FrmKlantenBestelling]![36+] AS [36+], [Forms]![FrmKlantenBestelling]![37] AS 37, [Forms]![FrmKlantenBestelling]![37+] AS [37+], [Forms]![FrmKlantenBestelling]![38] AS 38, [Forms]![FrmKlantenBestelling]![38+] AS [38+], [Forms]![FrmKlantenBestelling]![39] AS 39, [Forms]![FrmKlantenBestelling]![39+] AS [39+], [Forms]![FrmKlantenBestelling]![40] AS 40, [Forms]![FrmKlantenBestelling]![40+] AS [40+], [Forms]![FrmKlantenBestelling]![41] AS 41, [Forms]![FrmKlantenBestelling]![41+] AS [41+], [Forms]![FrmKlantenBestelling]![42] AS 42, [Forms]![FrmKlantenBestelling]![42+] AS [42+], [Forms]![FrmKlantenBestelling]![43] AS 43, [Forms]![FrmKlantenBestelling]![43+] AS [43+], [Forms]![FrmKlantenBestelling]![44] AS 44, [Forms]![FrmKlantenBestelling]![44+] AS [44+], [Forms]![FrmKlantenBestelling]![45] AS 45, [Forms]![FrmKlantenBestelling]![45+] AS [45+], [Forms]![FrmKlantenBestelling]![46] AS 46, [Forms]![FrmKlantenBestelling]![46+] AS [46+];
Also when I set the format property of the numeric controls to standard (as Allen Brown suggests in one of his tips) it does not work.
Hope this makes sense and makes it clear to you.
Arno R
.. |