I hope someone here can help--I know a very limited amount of VBA.
What I'd like to is create a function that can look at the fields on a form and determine how many of the fields are blank/null (3 fields are dropdowns, 2 are freetext, 1 is free-number). I'm sure it would be something to do with a For Each/Next command, I just don't know the appropriate syntax. Basically I want to look at Field 1 and if it's blank mark a 1, go to field 2, if it's blank mark a 1...after all the fields are determined, add up the "1s" . The end result is I want to take the result of the function and insert it as criteria into the query that runs the search function in the background (the search results finds matches in the search criteria-- I want to count the number of matches and display results n-1-- if that makes sense.
Screenshot of design mode:
The fields [SHID] and [CarryVal] wouldn't need to be counted as they are invisible in the form mode. Thanking anyone in advance.
What I'd like to is create a function that can look at the fields on a form and determine how many of the fields are blank/null (3 fields are dropdowns, 2 are freetext, 1 is free-number). I'm sure it would be something to do with a For Each/Next command, I just don't know the appropriate syntax. Basically I want to look at Field 1 and if it's blank mark a 1, go to field 2, if it's blank mark a 1...after all the fields are determined, add up the "1s" . The end result is I want to take the result of the function and insert it as criteria into the query that runs the search function in the background (the search results finds matches in the search criteria-- I want to count the number of matches and display results n-1-- if that makes sense.
Screenshot of design mode:
The fields [SHID] and [CarryVal] wouldn't need to be counted as they are invisible in the form mode. Thanking anyone in advance.
Last edited: