error 2113

mana

Registered User.
Local time
Today, 14:53
Joined
Nov 4, 2014
Messages
265
hello

i have a form with two fields in it: auftrag and vl_01 those are bounded to a query and when i fill out these data the data is inserted to the bounded table.

i want when i enter the auftrag the vl_01 will be automatically filled.
i wrote the below code in after update event of auftrag but i have the following errrror, can you help me pleasE??

error 2113 : the value you entered is not valid for this field

my code is this:

Private Sub Label_AfterUpdate()
Me.Prüfplatz.Value = "select VL-01 from qry_reifen_edit"
End Sub
 
Can you explain in plain english what you are trying to do with the following code:

Me.Prüfplatz.Value = "select VL-01 from qry_reifen_edit"
 
i want to get vl01 to fill out the prufplatz field.
vl01 in qry_reifen_edit is based on auftrag that i filled it out before in field lable.

do you know what my poblem is?













Me.Prüfplatz.Value = "select VL-01 from qry_reifen_edit
 
i want to get vl01 to fill out the prufplatz field.
vl01 in qry_reifen_edit is based on auftrag that i filled it out before in field lable.

do you know what my poblem is?

Me.Prüfplatz.Value = "select VL-01 from qry_reifen_edit
What is "auftrag "
 
auftrag is a field in my form that i fill it out manually and then i use the query that has the list of auftrags and vl01 to find out the related vl01 to the manually entered auftrag
 
auftrag is a field in my form that i fill it out manually and then i use the query that has the list of auftrags and vl01 to find out the related vl01 to the manually entered auftrag
Not sure I understand what you are trying to do but perhaps you should be using DLookup() function to return the required value
 
hello

thank you for your response but when i write the following code i have the below error:

run time error 3464, data type mismatch in criteria expression

the code is as below:

Private Sub Label_LostFocus()

Me.Prüfplatz.Value = DLookup("[VL-01]", "dbo_Nacharbeitszeit_mgnt_reifenedit", "[AUFTRAGSNUMMER] =" & Forms![frm_Reifenfelgen_Edit]!Label)



End Sub
 
this is the field auftrag, then i will find vl01 based on that
 
Try:
EDIT
Me.Prüfplatz= DLookup("[VL-01]", "dbo_Nacharbeitszeit_mgnt_reifenedit", "[AUFTRAGSNUMMER] ='" & Forms![frm_Reifenfelgen_Edit]!Label & "'")
 
hello

how can i mark the thread as solved?
 

Users who are viewing this thread

Back
Top Bottom