If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help to correct this DLookUp
Can you check what wrong with this DLOOKUp that I want o insert on a report.
=DLookUp("[Hora_Ok]";"[7_cons_Entradas_Saidas_Renwin_Saldo]";"[Employeenumber] = '" & [Employeenumber] & "' and [DataMarcacao]= '" & [DataMarcacao] & "'") I have a report base on a querie. and I need to lookup for a value in another querie. There field that I want to retrieve is Hora_Ok and is on querie named: 7_cons_Entradas_Saidas_Renwin_Saldo The criteria a DataMarcacao must be equal of datamarcacao of the report and employeenumber equal of EmployeeNumber of the report. What's wrong with my DLOOKUP? Best Regards, Marco |
#2
|
|||
|
|||
Help to correct this DLookUp
Marco wrote:
Can you check what wrong with this DLOOKUp that I want o insert on a report. =DLookUp("[Hora_Ok]";"[7_cons_Entradas_Saidas_Renwin_Saldo]";"[Employeenumber] = '" & [Employeenumber] & "' and [DataMarcacao]= '" & [DataMarcacao] & "'") I have a report base on a querie. and I need to lookup for a value in another querie. There field that I want to retrieve is Hora_Ok and is on querie named: 7_cons_Entradas_Saidas_Renwin_Saldo The criteria a DataMarcacao must be equal of datamarcacao of the report and employeenumber equal of EmployeeNumber of the report. What's wrong with my DLOOKUP? Best Regards, Marco Are both fields [Employeenumber] and [DataMarcacao] text fields? The single quotes you have around them are appropriate if they are Text, but not if they are numeric or date/times. I would also recommend using Me![Employeenumber] and Me![DataMarcacao] for the values from the report. The "Me" designator is not always necessary, but more things can go wrong without it than with it. Also, does your report have controls bound to those fields? Reports (for some reason) cannot refer to fields in their Recordset unless they are actually used by a control somewhere (even a hidden one). -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
Help to correct this DLookUp
Hi Rick. Thanks for your time. thanks.
EmployeeNumber and DataMarcacao is the same name for querie column name and report. Now I have this Dlookup but still returns error. =DLookUp("[Hora_Ok]";"[7_cons_Entradas_Saidas_Renwin_Saldo]";"[Employeenumber] = me!" & [Employeenumber] & " and [DataMarcacao]= me!" & [DataMarcacao] & ")") Regards, Marco "Rick Brandt" wrote: Marco wrote: Can you check what wrong with this DLOOKUp that I want o insert on a report. =DLookUp("[Hora_Ok]";"[7_cons_Entradas_Saidas_Renwin_Saldo]";"[Employeenumber] = '" & [Employeenumber] & "' and [DataMarcacao]= '" & [DataMarcacao] & "'") I have a report base on a querie. and I need to lookup for a value in another querie. There field that I want to retrieve is Hora_Ok and is on querie named: 7_cons_Entradas_Saidas_Renwin_Saldo The criteria a DataMarcacao must be equal of datamarcacao of the report and employeenumber equal of EmployeeNumber of the report. What's wrong with my DLOOKUP? Best Regards, Marco Are both fields [Employeenumber] and [DataMarcacao] text fields? The single quotes you have around them are appropriate if they are Text, but not if they are numeric or date/times. I would also recommend using Me![Employeenumber] and Me![DataMarcacao] for the values from the report. The "Me" designator is not always necessary, but more things can go wrong without it than with it. Also, does your report have controls bound to those fields? Reports (for some reason) cannot refer to fields in their Recordset unless they are actually used by a control somewhere (even a hidden one). -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#4
|
|||
|
|||
Help to correct this DLookUp
Marco wrote:
Hi Rick. Thanks for your time. thanks. EmployeeNumber and DataMarcacao is the same name for querie column name and report. Now I have this Dlookup but still returns error. =DLookUp("[Hora_Ok]";"[7_cons_Entradas_Saidas_Renwin_Saldo]";"[Employeenumber] = me!" & [Employeenumber] & " and [DataMarcacao]= me!" & [DataMarcacao] & ")") The "Me!" goes outside the quotes. =DLookUp("[Hora_Ok]";"[7_cons_Entradas_Saidas_Renwin_Saldo]";"[Employeenumber] = " & Me![Employeenumber] & " and [DataMarcacao]= " & Me![DataMarcacao]) -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
Thread Tools | |
Display Modes | |
|
|