MS Access Active X control

  Jarvo 20:02 23 Aug 2004
Locked

Hi

I am currently building a database in MS Access to log sales and I am having trouble with a Active X control in the input form.

The form adds data to a table which uses an auto number as is primary key field and worked fine until, I replaced the date text box with The active x control DTPicker9 (date picker that allows the user to pic a date from a drop down calender)using the date field as the control source. This works fine on records already in the database but if you select a new record you get the following message in a pop up box "Microsoft Access can't set value to NULL when CheckBox property = FALSE" The auto number primary key does not update until the OK button has been pressed and data has been added to another field within the table.

I fiddled with it all day yesterday to no avail and I can only assume that Access is spitting its dummy out because the activex control is adding the date before the primary key is added by the auto number. Can anyone help with this?

many thanks in advance

Jarvo

  Chris the Ancient 20:36 23 Aug 2004

A fairly specific Access question!

Without wishing to ruffle feathers in this forum, a lot of good help in Access can be found at

click here

It needs registration - but it's free.

Be sure to let them know what version of Access you're using - especially with ActiveX raising its head!

  Jarvo 21:01 23 Aug 2004

Thanks for your quick response and the link

What a site It always amazes me that when you think that you are just about getting an application sussed you find a site like that and realise you know the square root of didly squat ;-) I have tryed to join but my application failed so have to wait for a reply from them [must be wearing static generating underwear first active x and now website logins ;-))]

Surely we must have an Access whizz in here though?

Thanks again

Jarvo

  Chris the Ancient 21:14 23 Aug 2004

Usually accessmoron is floating around. But he seems to be out at the moment!

Tek-tips has been a bit iffy lately as they've had a major redsign. And that has caused a few crashes. Persevere and you'll get in.

BTW... that forum has bailed me out of the dirty stuff more than once ;o)

CtA

  Jarvo 23:30 23 Aug 2004

^

  Jarvo 06:49 24 Aug 2004

^

  Jarvo 15:55 24 Aug 2004

^

  Muckle 01:42 25 Aug 2004

You need to set a default value in the control source ie your table. Open the table in design view, click on the date field and click in 'Default Value' of the field properties section - type =Now() and each new record will have the current date set before you use the date picker and that should be the end of your error messages.

  AccessMoron 15:42 25 Aug 2004

open the date packer on a seperate form, using a button. Return the value to the main form, then put it into the correct textbox. That should cure your problem

  Jarvo 20:48 25 Aug 2004

Muckle & AccessMoron
Thanks for your responses Still not working though Iam going to have a go a rebuilding the form tomorrow when Iam less tyred. I will let you know how I get on

Jarvo

  Jarvo 18:18 09 Sep 2004

rebuilding the tables to add more functionality to the DB so will leave for now and start a new post if I have problems, ticking resolved to keep things tidy.

thanks for your help

jarvo

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

AMD Radeon Adrenalin release date, new features, compatible graphics cards

8 brilliant character artists speaking at Pictoplasma 2018

iMac Pro release date, UK price & specs

Football : comment regarder la Ligue 1 en direct ?