Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003

    Unanswered: Access Query won't Update at Run-Time

    I am writing a program in Visual Basic 6.0 that uses an Access Database for it's Data Storage to enable Users to generate Orders and then send them via Internet to the distribution company.

    I have a Data Access Grid that shows the list of items in the Order and a collection of controls below it to Interact with the data. Clicking an item in the data grid, sets the pointer to the corresponding record in the database. The Data Bound controls then update to the corresponding record correctly.

    The problem occurs when I make a change to a line detail. There is a query based off the table that gets changed and a static table in the database. The Control Bound to the field of the Query will not update.

    (Ex. One table is Order Details ([OrderDt]) and has a field called [Qty]. Another table is the complete Item List ([ItemList]) and has a field called [MinPack] for the # of pieces that come per pack. Then the Query [Display] multiplies those 2 fields for Extended Quantity [ExQty]. In the program, there is a Bound Control to [ExQty] of [Display]. And if I change the [Qty] of the [OrderDt] table the [ExQty] of the [Display] Query will update, but not the Bound Control's diaply)
    Last edited by SlashZero; 07-15-03 at 15:18.

  2. #2
    Join Date
    Jul 2003
    Frankfurt, Germany

    Re: Access Query won't Update at Run-Time

    whow, that is a real long description text, hm?

    if i understand your problem correctly, all you need to do is a refresh on your data grid after executing the update query, something like:

    or in some extra tricky cases you might to reattach the data source to the whole grid (especially if it is a stored proc):

    myGrid.DataMember = (stored proc name) or (tableName)

    hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts