Not in List Event Problem

007stuart

Registered User.
Local time
Today, 23:49
Joined
Mar 20, 2009
Messages
23
Hi I have a form that (FrmAddressInput) that contains several Combo Boxes, many of which have Not in List Events set to allow me to add new data to the appropriate lookup tablss ( all perform perfectly).

I now have added a new Combo Box (CboPropertyName) to allow The Development the address relates to be added to the client address, however for this combo box my Not in List Code fails.

I am at a loss as to why this has happened as the code for this combo box is identical to the others ( I copied and pasted and changed the names to my new combo box)

The error and code is attached on the enclosed zipped doc along with a zipped copy of my adddress db.

Any assistance would be greatly appreciated
 

Attachments

In your zipped database there is no code etc for CapitalizeFirst or Proper. How do you CapitalizeFirst and also Proper?

In your code for CboPropertyName_NotInList
The following code adds Town to the table tblTown
strSQL = " INSERT INTO TblTown ( Town ) SELECT '" & Proper(NewData) & "'"

But in your Document you are adding TblPropertyName ( PropertyName ). Also in your document you have a line of code
On Error GoTo err_CboTown_NotInList but there is no label err_CboTown_NotInList. May I suggest that you Compile your code to check for coding errors. Would you also upload a version that has the same code as your document.
 
Further to my previous post you CAN NOT just add a property name to the drop down. Have a look at your Relationships diagram, there are other tables LINKED to the TblPropertyName

If a Property Name is not in the list then a form must be opened to allow the user to enter ALL details so that the fields FreeholdID, AliasId and Alias2ID can be populated with the required details from the respective linked tables.
 
007Stuart,

Sorry I took me so long to get back to you, but I had something to come up and I just have not had a chance to look at your database.

Now that I have looked at it, Poppa Smurf is right on with his comments.

If you truly need to make sure that all of the data you are requiring by the way you have your relationships set up then you will have to open a form to have the user complete all of the required data before the new record can be added to that combo box list. You can pass the "New Data" value to the form where the Property info is to be entered when you open it using the OpenArgs argument of the OpenForm statment.


HTH
 

Users who are viewing this thread

Back
Top Bottom