🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.bazy-danych.msaccess
Article #137167

Re: Access 2010 łączenie kilku kryteriów do kwerendy

#137167
From: leku
Date: Sun, 01 May 2016 16:36
41 lines
2248 bytes
Użytkownik "Zbigniew Bratko"  napisał w wiadomości grup 
dyskusyjnych:ng4rbg$b0d$1@node1.news.atman.pl...

[...]

-----------------------------------------
Adoptowałem do swoich danych
[Forms]![Import]![Kryt3] to pole formularza z którego pobieram kryterium do 
DLookUp
a następnie zaciągany jest zestaw kryteriów z tabeli Kryteria_3 do kwerendy 
wynikowej
np taki zestaw A1;B1;C1

Debuger zatrzymuje się na linijce
sWhere = ...



Private Sub Polecenie37_Click()
   Call Filtruj("Kryt3")
End Sub

Private Sub Filtruj(strId_kryt As String)
Dim qryTmp As DAO.QueryDef
Dim sWhere As String

   sWhere = Replace(DLookup("[kryt_pow2]", "Kryteria_3", "[GU] = '" & 
strId_kryt & "'"), ";", ",")    ' tu mam błąd Invalid use of Null

  'Usuń tymczasową kwerendę
   On Error Resume Next
     DoCmd.DeleteObject acQuery, "qTemp"
   If Err.Number <> 0 Then Err.Clear
   On Error GoTo 0

   Set qryTmp = CurrentDb.CreateQueryDef("qTemp", _
       "SELECT Imp_temp.* FROM Imp_temp WHERE F14 IN (" & sWhere & ")")

   DoCmd.OpenQuery qryTmp.Name, acViewNormal

End Sub
Technical Details
Message-ID: <57263093$0$22828$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <571b871d$0$641$65785112@news.neostrada.pl> <ng4rbg$b0d$1@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
From: "leku" <lekucz@wp.pl>
Newsgroups: pl.comp.bazy-danych.msaccess
References: <571b871d$0$641$65785112@news.neostrada.pl> <ng4rbg$b0d$1@node1.news.atman.pl>
In-Reply-To: <ng4rbg$b0d$1@node1.news.atman.pl>
Subject: Re: Access 2010 łączenie kilku
 kryteriów do kwerendy
Date: Sun, 1 May 2016 18:36:48 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
Lines: 43
Message-ID: <57263093$0$22828$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 79.184.171.75
X-Trace: 1462120595 unt-rea-a-02.news.neostrada.pl 22828 79.184.171.75:50021
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit