Toukey-
Rather than look up a single sequence number, I would think you would simply run your UPDATE query to update all records that match on client number and whatever is the "type" field you mentioned earlier.
uquery = "update tblAllPols set InvDate = # " & varx & " # where [tblAllPols].[ClientNo] = " & xx & " AND type = " & ???
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Nov 16, 2016, at 2:14 PM, toukey1 <no_reply@yahoogroups.com> wrote:
The fields are different to what I sent initially but this below is an extract of what is being used now. Some very old code I might add.
xx = Me!ClientNoCombo.Column(0)
varx = Me!Date
vard = Me!IssueDate
vary = Me!PolicyNo
varz = Me!Premium
varp = Me!Tax
add2 = " And [tblAllPols].[PolicyNo] = '" & vary & " ' "
add3 = " And [tblAllPols].[Premium] = " & varz
add4 = " And [tblAllPols].[ClientNo] = " & xx
vno = " And [tblAllPols].[InvNo] = 0"
add8 = " And [tblAllPols].[Tax] = " & varp
sno = DLookup("[SeqNo]", "tblAllPols", "[tblAllPols].[Issuedate] = # " & vard & " #" & vno & add2 & add3 & add4 & add8)
uquery = "update tblAllPols set InvDate = # " & varx & " # where [tblAllPols].[SeqNo] = " & sno
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
It would help to see your code.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Nov 15, 2016, at 9:02 PM, toukey1 <no_reply@yahoogroups.com> wrote:
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar