🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#137138
From: MaciejF
Date: Sat, 30 Apr 2016 13:51
39 lines
2495 bytes
...
> Kombinuje na różne sposoby zapis danych w tabeli pomocniczej
> Z cudzysłowami pojed. , podw. lub bez , ze średnikami z przecinkami itd  bez 
> rezultatu :(
> Kwerenda zwraca 0 rekordów tak jakbym w kryterium wpisał "".
> 
> 
> pozdrawiam
> leku

Powalcze jeszcze.
Proponuję utworzyć przycisk a pod przyciskiem kod:

Sub btnPowiaty_click()
Dim sSQL As String, sCond As String
Dim db As Databese
Set db = CurrentDB

sCond = [Forms]![IMPORT]![kryt2]

IF IsNull(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 & ")));"


db.Ececute sSQL

Set db = Nothing
End Sub


Pozdrawiam
MF
Technical Details
Message-ID: <fdc4a38d-07f8-41f4-bb94-723d97a4c145@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!2.eu.feeder.erje.net!news.ripco.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!11no193631qgt.0!news-out.google.com!k10ni134igv.0!nntp.google.com!sq19no677238igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <571b871d$0$641$65785112@news.neostrada.pl> <073ae140-8104-4f0b-8178-a838692eda19@googlegroups.com> <5724847c$0$22828$65785112@news.neostrada.pl>

Show Full Headers
Complete Article Headers
X-Received: by 10.140.92.236 with SMTP id b99mr17085767qge.21.1462024303629;        Sat, 30 Apr 2016 06:51:43 -0700 (PDT)
X-Received: by 10.50.30.38 with SMTP id p6mr220177igh.10.1462024303486; Sat, 30 Apr 2016 06:51:43 -0700 (PDT)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!2.eu.feeder.erje.net!news.ripco.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!11no193631qgt.0!news-out.google.com!k10ni134igv.0!nntp.google.com!sq19no677238igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: pl.comp.bazy-danych.msaccess
Date: Sat, 30 Apr 2016 06:51:42 -0700 (PDT)
In-Reply-To: <5724847c$0$22828$65785112@news.neostrada.pl>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=178.36.115.216; posting-account=kc7ZIQoAAAB5PkdJgxjq1dd8jnBK4MVp
NNTP-Posting-Host: 178.36.115.216
References: <571b871d$0$641$65785112@news.neostrada.pl> <073ae140-8104-4f0b-8178-a838692eda19@googlegroups.com> <5724847c$0$22828$65785112@news.neostrada.pl>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fdc4a38d-07f8-41f4-bb94-723d97a4c145@googlegroups.com>
Subject: Re: Access 2010 łączenie kilku
 kryteriów do kwerendy
From: MaciejF <maciejfr@onet.pl>
Injection-Date: Sat, 30 Apr 2016 13:51:43 +0000
X-Received-Bytes: 2253
X-Received-Body-CRC: 2744170719
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit