anothe question

24sharon

Registered User.
Local time
Today, 07:54
Joined
Oct 5, 2004
Messages
147
another question

Good night (from here)

I have 2 tables

1. (BOOKS)
______________
IDBOOK (identity)
Name ….

2. (ALL_BOOKS)
_________________
IDallBOOK (identity)
IDBOOK (number) [from the table BOOK]
B_number (number)

For example:
The book "my sun" can be twice or more.

My question is what better to be the code of the books the ID from the second table (178, 169) and then its number/
Or the ID from the first table and the num (125-2, 178-3, 178-1) then its string.

*****************************
and another question
I have a form with a listbox.
if the newvalue isnot in the list
I ask the client if he want to insert it
then I want to open a form
and insert the new data in the filed.
I wrote this, but without success
Code:
Private Sub kod_book_NotInList(NewData As String, Response As Integer)
Confirm = MsgBox("do you want to insert the  " & NewData & " to the list?", vbYesNo)
       
        If Confirm = 6 Then
           
            DoCmd.OpenForm "book", , , , acFormAdd, acDialog
            Forms!book![name_book] = NewData
            Response = acDataErrAdded  ' Requery the list
        Else
            Response = acDataErrDisplay  ' Display the error
        End If
End Sub
Thanks for your advice
s.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom