Vba inserting multiple records from multiple unbound text boxes

jackie77

Jackie
Local time
Today, 15:56
Joined
Jul 18, 2007
Messages
85
Hi Everyone

I was looking for some help

I have a form with 15 unbound text boxes (daily temperatures) and what I am trying to do after entering the temperatures into the text boxes the user clicks an add button which will add 15 new records into the temperature table

the code I have started off with is

Code:
CurrentDb.Execute "INSERT INTO ColdTemperatures (ProductID, ColdTempDate, Temperature) VALUES (" & Lettuce & ", #" & Me.RealTime & "#, " & Me.Lettuce & ")"
which adds 1 successfully however if i repeat the code above for all 15 this Im assumming will create a potential bottleneck and slow the system down

is it possible to add all 15 records at once? do you think Im going at this the right way

any help would be great ;) lol

cheers

jackie
 
Just create a Bound Continuous Form/Datasheet view and enter it as you would. Why are you using unbound forms here anyway?
 
Thanks pr2-eugin for the reply

The reason I didnt use bound Continuous Form/Datasheet because I needed to display all products that require temperature checked so the user did not miss a product out so in essense they simply filled out a sheet with everything labeled for them if I use a continuos form they would have to select the product from a drop down list and I had no way to ensure they documented everything the unbound form help show a better visual representation of what they need to do

due to this I thought it best to use unbound form for them to enter and then use vba to insert (however its proving harder than I thought lol)

Jackie
 
So you would be interested in getting an inefficient, "user buttered up" method over efficient, "this is how things work" method? :rolleyes:
 
Hi pr2-eugin

Again thanks for the reply (even if it was somewhat salty!)

and no Im not interested in using an inefficent method, I can see and understand where your coming from of how more efficent and simply it would be to use Continuous Form/Datasheet for this task, that being said the whole point of using this is to improve on our manual method - at present they fill in a sheet with all products listed so they know what temperatures to take and when, if I use a Continuous Form/Datasheet form then how can I control and ensure that they have entered the all the temps of all products, hense the system would cause further problems and not improve upon the manual system! (we are also using a touch screen monitor)

The reason why I came on this forum was to ask for help and ideas on way to over come this problem as I could see what I was doing was not the best way but was looking to see what other ideas people had or to hopefully get another perspective as sometimes when you look at a problem for to long it take others ideas to get you moving in another direction!

I explained my thoughts of what I was trying, I could obviously see (and my gut told me this was perhaps not the best way- hense my comment in my first post where I asked has anyone any other ideas of how to do this could be accomplished better!) I want my system to be effceint but also to be user friendly and I'm just trying to find the best way to do this!

Thanks anyway

Jackie
 
Has anyone any suggestions on this?

Cheers

Jackie
 

Users who are viewing this thread

Back
Top Bottom