B
bg-consult as, Leif Hauge
Hi !
Need more help in my database, this time probably an easy task :
I input digits into a field called [Input] in one form. I have made a button
that open a different form with a filter where a field from the new form
called [PhoneNo] is similar to [Input] from the previous form. This works
well.
But, I want to add a special function, where the following happens :
- If the field [PhoneNo] is empty, the input from [Input] should be inserted
automatically, and if the field [PhoneNo] allready is filled out, it should
do nothing.
Could you please help me create the code for this ?
So far I have this :
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form1"
stLinkCriteria = "[PhoneNo]=" & "'" & Me![Input] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Best regards
Leif Hauge
Need more help in my database, this time probably an easy task :
I input digits into a field called [Input] in one form. I have made a button
that open a different form with a filter where a field from the new form
called [PhoneNo] is similar to [Input] from the previous form. This works
well.
But, I want to add a special function, where the following happens :
- If the field [PhoneNo] is empty, the input from [Input] should be inserted
automatically, and if the field [PhoneNo] allready is filled out, it should
do nothing.
Could you please help me create the code for this ?
So far I have this :
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form1"
stLinkCriteria = "[PhoneNo]=" & "'" & Me![Input] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Best regards
Leif Hauge