[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bump::msaccess

Title:MSACCESS
Moderator:BUMP::HONER
Created:Tue Dec 01 1992
Last Modified:Mon Jun 02 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1661
Total number of notes:6339

1640.0. "dynamic population of form within code!" by HYLNDR::DUFAULT () Thu Mar 13 1997 17:32

    OK! I've come to a dead end! What happened is this...I have an SQL
    Server machine (V6.5) and an ACCESS 97 Client machine. The server has 
    stored procedures which I call from my ACCESS client code via 
    pass-through queries. So now I'm running my ACCESS 97 and I put up the
    first form. This form (datasheet view) has a combo-box in the 'header'
    section which acts as a filter. When you click on an item in the combo
    box it passes you to an 'Event procedure'. This sub-procedure code
    executes a pass-through query which returns the records I want from the
    SQL Server. Now...in the code I have to cycle through each record and
    try to place each value in each field up on the form in the
    corresponding field.
    
    The problem is this...the first record and all it's fields get put up
    on the form, but when I move to the second record (in the code) and
    then go to put the values from each field up on the form...it writes
    over the first entry in the form. So what happens is I keep writing
    each successive write over the previous one. When I created the form
    I picked 'datasheet' style...thinking it would write each record 
    one line at a time, just as in 'datasheet' view. NOT!
    
    I don't know what I need to do in the code in order to make this come
    out like a query "in datasheet view". 
    
       mark
T.RTitleUserPersonal
Name
DateLines
1640.1Passthrough query has a non-updatable recordsetNSIC00::KLERKThunderbirds are GoFri Mar 14 1997 06:5815

    Datasheet is supposed to work like you suggest: each line is its own
    record. Only the current line (indicated by > in the left margin) is
    active as the current record.

    The passthrough query however, returns a non-updatable dataset, according
    to Access 95 Help topic "Determining when I can update data from a query".
    It says that SQL Pass-through query is not updatable.
    
    (You also may look up Access Help topic "Using SQL Passthrough with DAO"
    for a way to copy data into a local table and then update that before
    returning the table to the SQL Server for updating the original table)

    Theo
1640.2RE: populating datasheet viewHYLNDR::DUFAULTFri Mar 14 1997 15:491
    Thanks for the reply...I'll try looking for that help you mentioned.