Thanks Jdraw, I already modified your code to account for queries rather than tables. I had a little problem with using double quotes in my query that I had to change to null in order for them to not be counted. Thanks again for all of the help, I am extremely grateful!
Jdraw that works perfectly on a table. I guess now all I need to do is change the table references to query references and test it. If that doesn't work then I'll just change the query into a make table query and reference the new table. Thanks for all the help. You're the greatest!
This is where I pasted in your code. Nothing happens, it doesn't count.
Function CountRawIssuesHeadings()
changes = CurrentDb.TableDefs("RawIssuesHeadings03").Fields.Count
If changes > 0 Then
MsgBox "You have " & changes & " changed heading(s) or they are not in the correct order...
The query identifies if any of the imported table field headings have changed. The query will only have one row with changed headings showing up and null contents if no change was made across all 141 fields. If 5 headings have changed all I need to do is count the number of fields in the query...
I have a query that has 141 fields. A field may be populated or empty. I am trying to count the number of fields that are not null using vba.
dCount only give me the number of rows
FieldCount = DCount("*", "RawIssuesHeadings03")
I am hoping that I can find examples of Access VBA on this site that will help me to improve my models. I have built many access models, but from time to time I run into roadblaocks. Thanks for your help in advance.