Kamis, 01 September 2011

[MS_AccessPros] Re: UPDATE Statement

 

Actually, a subform's record source is from the activity table (see below). So I guess it is bound to the table.

SELECT PTbl_Activity.ID FROM PTbl_Activity WHERE...

Thanks!
Mike

--- In MS_Access_Professionals@yahoogroups.com, mithomas48 <no_reply@...> wrote:
>
> That's a good question, but no, it's not linked to the activity table. The form is loaded with another data source and it is calling a global procedure that updates the table it is linked to (which seems to be fine), and the multiple records in activity for the same account number. It is here that it is consistently missing one record in the update.
>
> Thanks for getting back!
> Mike
>
> --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@> wrote:
> >
> >
> > Do you have a form open that is bound to the PTbl_Activity?
> >
> > Duane Hookom
> > MS Access MVP
> >
> >
> >
> >
> > To: MS_Access_Professionals@yahoogroups.com
> > From: no_reply@yahoogroups.com
> > Date: Thu, 1 Sep 2011 14:21:44 +0000
> > Subject: [MS_AccessPros] UPDATE Statement
> >
> >
> >
> >
> >
> >
> > Can anyone explain why the below Update statement misses one record in every instance? For example, let's say there are 50 records to be updated and there are 2 account numbers. So there are 25 records for each account number. The update statement below updates each account number but leaves only ONE record for that account number NOT updated. When I sort a query on the accounts, I can see that it is probably either the first or last record for that account that's not updated. Can anyone explain why this is happening and how to correct it?
> >
> > strSQL = "UPDATE PTbl_Activity SET " & _
> > "QC_Complete = True, " & _
> > "QC_Complete_DT = Now() " & _
> > "WHERE PTbl_Activity.[LOAN NUMBER] = '" & iCurrLoan & "' " & _
> > "AND PTbl_Activity.PORTFOLIO = '" & iPortf & "';"
> >
> > Thanks!
> > Mike
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar