Okay, so I am having a problem. This app is sending data into a website from a txt field on a form... if the search is performed while the field is blank, it runs a query on the site and tries to pull back over 300k clients. Causing stress on the server and a performance issue for many people....
Essentially I am trying to say, If this txt on this form is blank, then exit sub and end if.
This does not look right to me. I am fairly new to VBA and I cannot think of the solution.
Code:
If Forms("frmMain").txtLMClient <> "" Then
Exit Sub
End If
Here is a bigger part of the code I guess it might help. +
Code:
oHub.Document.all.Item("providerAcctSearchForm.providerAcctName").Value = Forms("frmMain").txtLMClient.Value
If Forms("frmMain").txtLMClient <> "" Then
Exit Sub
End If
oHub.Navigate "javascript:submitFormWithAction(document.providerAccountSearchSummaryForm, document.providerAccountSearchSummaryForm.form_action, 'ActionSearchProviderAccounts')"
Basically I do not want the last ohub.navigate to run if that field is blank.... Any help would be appreciated.