Z
Zulay
Good afternoon all:
I have a table with 3 columns: ID, Name, Profession. In one of my forms,
I have a textbox with a name of a person that exists on the table. I would
like to retrieve the profession of that person by looking in the table and
save the profession in a variable to use it later in an if else statement. I
understand the algorithm but I am not sure how to write it on Visual Basic.
This is the code of what I want to do but without implementing what I
describe above. I need help on that.
Dim stDocName As String
Dim stLinkCriteria As String
Dim personfuntion As String
personprofession = ........?
If (personprofession = "Engineer") Then
stDocName = "Form1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Any help will be really appreciated. Thanks!
I have a table with 3 columns: ID, Name, Profession. In one of my forms,
I have a textbox with a name of a person that exists on the table. I would
like to retrieve the profession of that person by looking in the table and
save the profession in a variable to use it later in an if else statement. I
understand the algorithm but I am not sure how to write it on Visual Basic.
This is the code of what I want to do but without implementing what I
describe above. I need help on that.
Dim stDocName As String
Dim stLinkCriteria As String
Dim personfuntion As String
personprofession = ........?
If (personprofession = "Engineer") Then
stDocName = "Form1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Any help will be really appreciated. Thanks!