Add new record

Cass

New member
Local time
Today, 23:21
Joined
Oct 2, 2004
Messages
7
How to add new record in table when it is not in my combo box without open source table?

Sample:
Add data into Form to tblTotal. Select record in combo box (combo box source is in tblTable2) ... Oops there isnt record what i want insert. MsgBox promt me add new record [OK] or repair selection [CANCEL]
If [OK] then insertbox open and fill fields (3 different, 1 must be combo box :rolleyes: ) press [OK] and go back Form where the new record is there.

Hope i explane understandably :rolleyes:

___________
Access 2003
 
Last edited:
Search for "NotInList". This needs to be done using code, so some VBA knowledge will be required.

Dave
 
Oldsoftboss said:
Search for "NotInList". This needs to be done using code, so some VBA knowledge will be required.

Dave

I found it alrady and I work on it and thinking how tu use input msgbox.
I know my VBA is not so good but i test and try and learn ;)
 
Try this. I tidied it up a bit.

It will:

1..Pose a question when a Customer is not in the list.
2..Add the data to a pop up form and allow you to complete the details.
3..Check whether the Customer is already listed. (Avoids having multiple entries for the same Customer)
3..Allow you to browse for a client and then double click to select them in the Customer field.
4..Double Click in the Customer field to view full details.

Hope this is of some help out there.

Dave
 

Attachments

Last edited:
Oldsoftboss said:
I'm sure this will do all you want ...

Dave
I test and try this first version and thanks a lot. It works now ;)
my database is overview my outgoings and where i spend my money :)

Now another feature - default value :)
I know to set the value in properties but is it possible to use something like this:

first record select value and (after update?) new record value is this value as default since i change this value

I mean in this feature if i have 10 same artikel but price is different then new record value is same like previous record :rolleyes:

But sry my bad englis also :cool:
 
You asked....

Making the next field in records default to the last record.

I am using the UserID field here. Just substitute the fields/s you wish to repeat.

In the After Update event of the UserID field put code like this:
Me![UserID].Tag = Me![UserID].Value
In the On Enter Event of the same field put code like this:
If Not Me.NewRecord Then Exit Sub
If Not (IsNull(Me![UserID].Tag) Or Me![UserID].Tag = "") Then
Me![UserID].Value = Me![UserId].Tag
End If
The UserID will not carry over into your next session with the form but will work as long as the form is open....
 

Users who are viewing this thread

Back
Top Bottom