Hi, I'm a bit new to this vba thing, so please bear with me.
I'm trying to make an unbound form for data entry only. It will gather the entered information from all the fields in the form and submit it as a new record.
I have managed to get this to work. However my method is EXTREMELY innefficient, as I simply assign each field a variable and then feed that data into the dataTable.
So what I am trying to do is set up a procedure which simply increments through each item in the form and gets the item's data and name. This would then be stored in an array, and the array would be fed into the dataTable.
So I need a method to increment through the form.
I've tried using Forms!FormName(#) to call each item, however I am running into a lot of errors with data types. Also, I seem to be getting a large number of null values from this method, which trips up any Debug.Print statement. How do I deal with that?
Is that a common way of doing this?
Are there any examples that I can look at?
Thanks
I'm trying to make an unbound form for data entry only. It will gather the entered information from all the fields in the form and submit it as a new record.
I have managed to get this to work. However my method is EXTREMELY innefficient, as I simply assign each field a variable and then feed that data into the dataTable.
So what I am trying to do is set up a procedure which simply increments through each item in the form and gets the item's data and name. This would then be stored in an array, and the array would be fed into the dataTable.
So I need a method to increment through the form.
I've tried using Forms!FormName(#) to call each item, however I am running into a lot of errors with data types. Also, I seem to be getting a large number of null values from this method, which trips up any Debug.Print statement. How do I deal with that?
Is that a common way of doing this?
Are there any examples that I can look at?
Thanks