textbox to list box via cmd button

bremensleash

Registered User.
Local time
Tomorrow, 02:37
Joined
Jul 15, 2008
Messages
24
Hello can you pls

give me a example for it my mind is twisted right now even google cant help me.


i just want to add the information with the help of command button can you help me pls.

i dont know where to start

for example i want to add

john doe *its in my textbox*

to my list box via cmd button

and i want to add another name into list

without replacing john doe

for ex i want to add frankfurt romer

to the 2nd line

please guys you help me:confused:
 
from where list is taking the data is it a table or you have feeded values manually
 
from the table

meaning every time i click the

cmd button on the form

it will ad values to the list that will update the table.
 
Attached a sample database for you
 

Attachments

thanks kawar this solve my problem thx many thx

after 1 month of puzzle :D
 
Private Sub Command4_Click()
If IsNull(Text1) Or Text1 = "" Then
MsgBox ("Enter Some Data")
Else

Set dbList = CurrentDb() *can you explain to me what this code does*
Set rs = dbList.OpenRecordset("ListBoxItems") *Is ListBoxItems Record in the table*
With rs
.AddNew
!
[ListBoxItems] = Me.Text1
.Update
.Close
End With *What is RS*

End If
Me.Refresh
 
Private Sub Command4_Click()
If IsNull(Text1) Or Text1 = "" Then
MsgBox ("Enter Some Data")
Else

Set dbList = CurrentDb()
*This statement is used to establish connection with the current database*


Set rs = dbList.OpenRecordset("ListBoxItems")
*This is the name of the table to open for making entries*


With rs
.AddNew
![ListBoxItems] = Me.Text1 *ListBixItems is the field name in the table "ListBoxItems" from where the list is getting the data*
.Update
.Close
End With *RS is the name assigned to Recordset you can use whatever name you want*

End If
Me.Refresh
 
hello khavar can you attach also the table and the querie for it


i dont get where tha data is being save

therefore i cannot apply it to my personal database

Thanks for your help khavar i do appreciate it

im very confused right now
 
Press shift key while opening and hold till database completely loads
every thing is in there
 
What do you mean by multople values into one table
Are you talking about saving multiple items at once and showing in a multi column list box
 
yes like multiple list values into 1 account

can i make it like that
 

Users who are viewing this thread

Back
Top Bottom