Okay when i fail to select a Location from a drop down i get a msgbox "Select Location" i then select a location and run the export to excel all works fine....
the second time the location is in so the error msgbox doesn't appear the export happens but the code doesnt run properly... here is...
No seems to be fine falls back down to noraml levels ......but i cant seem to re-create the error anymore either. the etc etc etc code is just a excel macro that runs in the active window it just formats some cells in the sheet. Will keep experimenting with diffrent arrangements
The code breaks before the excel formating begins, but only the second time it runs, im thinking access is passing a default value the frist time it runs and works fine but the second time access starts looking for an object defintion and i havent set it in the code.
Where do you want to call this from and what will it achive?
Do you want a function to be performed IF there are records in table 1, feild 1 that match the variable?
Are you putting the variable into a textbox on a form?
Where are these Null values coming from?
Are you using forms?
If so on the afterupdate of a field use
if isnull(yourfield) then
me.yourfield = 0
end if
this will stop any nulls.
Or set the field validation rule to IS NOT NULL
For your exisitng null vaules you can manually change them to 0...
From a form i have a command button that gives an excel out put of a 3 querys onto 3 tabs of an excel file. It then opens the file and formats the data slightly. This works fine. Once then if i try the same thing again it give an error. If i close the db re-open and try again it works but only...
Create an update qry that updates all the NULL values to 0 and run this. This will resolve any existing nulls to Zero.
Change the default value of the field to Zero.
You can then either make sure that people can't enter null vaules in your forms or set this as a validation rule for the feild...
Yep , im pulling a filtered set of data from a server table to a local table. This local table is the source for the form, so that the user is filtering less information on the form itself (some speed issues for networks in some sites). Deleting the table seems to be a neater solution as some...
I have a complex Form with subform. The subform is based on a qry which pulls data from a temptbl. I want to be able to re-create the temptbl and then requery the subform. Access wont allow me to delete the old temp table as its locked in use on the subform.
Is there some way of disconnecting...