Jump to content

DPesquisar


srcastro
 Share

Recommended Posts

srcastro

Boa tarde,

Estou a utilizar a função "DPesquisar", num relatório, mas meu código com vários critérios, não funciona. Alguem me consegue ajudar?

Todos os campos são texto, excepto a Espessura que é número.

=DPesquisar("[CodigoSistemaPainel]";"Correspondencia";"[Modelo]='" & [Modelo] & "' and [Vidro]='" & [Vidro] & "' and [Espacador] ='" & [Espacador] & "' and [Triplo] ='" & [Triplo] & "' and [Espessura]=" & [Espessura] ")

Link to comment
Share on other sites

carlosAl

Bom dia,

quando os campos sao de texto tens de incluri o valor que queres procurar em double quotes. fiz so para o  primeiro campo e teras de adaptar o resto:

Dim x As String
m = "a"
x = DLookup("[CodigoSistemaPainel]", "Correspondencia", "[Modelo]=""" & m & """")

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.