Article View: pl.comp.bazy-danych.msaccess
Article #137145Re: Access 2010 łączenie kilku kryteriów do kwerendy
From: MaciejF
Date: Sat, 30 Apr 2016 17:57
Date: Sat, 30 Apr 2016 17:57
32 lines
2515 bytes
2515 bytes
poprawka DCount:
Sub btnPowiaty_click()
Dim sSQL As String, sCond As String
Dim qdf As DAO.Querydef
sCond = [Forms]![IMPORT]![kryt2]
IF IsNull(sCond) Or sCond = "" Then
Exit Sub
End IF
'sformatuj kryteria dodajac podwojne cudzysłowy
'uwzglednilem poniżej że masz separator średnik i że masz kryteria zaciagniete bez cudzysłowów
sCond = """" & Replace(sCond, "";"", """";"""") & """"
sSQL = "SELECT Imp_temp.F14 AS Powiat FROM Imp_temp WHERE (((Imp_temp.F14) In (" & sCond & ")));"
If DCount("*", "MSysObjects", "[Name] = qGeneric And [Type] = 5") = 1 Then
DoCmd.DeleteObject(acQuery, "qGeneric")
End If
Set qdf = CurrentDB.Querydefs("qGeneric")
qdf.SQL = sSQL
qdf.Execute
End Sub
To już chyba dziś koniec!
MF
Technical Details
Message-ID:
<8723125d-086a-4452-8de2-710297057d5f@googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin.stu.neva.ru!news.ripco.com!news.glorb.com!sq19no775109igc.0!news-out.google.com!k10ni189igv.0!nntp.google.com!i5no664760ige.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mailReferences:
<571b871d$0$641$65785112@news.neostrada.pl> <073ae140-8104-4f0b-8178-a838692eda19@googlegroups.com> <5724847c$0$22828$65785112@news.neostrada.pl> <fdc4a38d-07f8-41f4-bb94-723d97a4c145@googlegroups.com> <fd443da0-eedc-4a0c-a73f-0db905d90224@googlegroups.com> <5724ddf1$0$658$65785112@news.neostrada.pl> <8aed9f36-9a23-43c1-b4a9-a6a820e54b3d@googlegroups.com> <eafa8aa8-8082-4adf-ab98-8f001100dcc3@googlegroups.com> <42cf6df6-c669-4557-9fbb-3a9dae698ae1@googlegroups.com>Show Full Headers
Complete Article Headers
X-Received: by 10.182.68.102 with SMTP id v6mr18394497obt.24.1462039053829; Sat, 30 Apr 2016 10:57:33 -0700 (PDT) X-Received: by 10.50.92.1 with SMTP id ci1mr233837igb.1.1462039053801; Sat, 30 Apr 2016 10:57:33 -0700 (PDT) Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin.stu.neva.ru!news.ripco.com!news.glorb.com!sq19no775109igc.0!news-out.google.com!k10ni189igv.0!nntp.google.com!i5no664760ige.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: pl.comp.bazy-danych.msaccess Date: Sat, 30 Apr 2016 10:57:33 -0700 (PDT) In-Reply-To: <42cf6df6-c669-4557-9fbb-3a9dae698ae1@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=77.253.61.208; posting-account=kc7ZIQoAAAB5PkdJgxjq1dd8jnBK4MVp NNTP-Posting-Host: 77.253.61.208 References: <571b871d$0$641$65785112@news.neostrada.pl> <073ae140-8104-4f0b-8178-a838692eda19@googlegroups.com> <5724847c$0$22828$65785112@news.neostrada.pl> <fdc4a38d-07f8-41f4-bb94-723d97a4c145@googlegroups.com> <fd443da0-eedc-4a0c-a73f-0db905d90224@googlegroups.com> <5724ddf1$0$658$65785112@news.neostrada.pl> <8aed9f36-9a23-43c1-b4a9-a6a820e54b3d@googlegroups.com> <eafa8aa8-8082-4adf-ab98-8f001100dcc3@googlegroups.com> <42cf6df6-c669-4557-9fbb-3a9dae698ae1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8723125d-086a-4452-8de2-710297057d5f@googlegroups.com> Subject: Re: Access 2010 łączenie kilku kryteriów do kwerendy From: MaciejF <maciejfr@onet.pl> Injection-Date: Sat, 30 Apr 2016 17:57:33 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit