Andy,
This code work PERFECTLY. Thank you for everything. The only change I had to make with other code was this.
changed
"VALUES ('" & .Column(0, intRowCtr) & "','" & _
to
"VALUES ('" & .Column(1, intRowCtr) & "','" & _
Last question since I'm new to this site. Is there a "solved" button...
Thank you for the feedback, proper way to format code.
I have a public sub with the following
Public Sub CopyEmplyeeSelected(ByRef frm As Form)
Dim ctlSource As Control
Dim ctlDest As Control
Dim strItems As String
Dim intCurrentRow As Integer
Set ctlSource = frm!lstEmployeeSelect
Set...
Again, Thank you. I fully understand why I'm not getting the number. I expressed that in pervious posts. Maybe I'm just not asking the right question, so let me try again.
lstemployeeselect is populated by a query with 2 columns. column 0 is their name, column 1 is their number. When they...
Yes-thank you. But my question is still the same. How do I code the insert statement to insert the employee number instead of the employee name?
I explained the 2 lstbox setups previously.
Thanks in advance
update I changed it to column 1 not 0
"VALUES ('" & .Column(1, intRowCtr) & "','" & _
When I did this change nothing is submitted to the employee_number field in the test1 table when it is column 0 I get their name
Andrzejek , I really appreciate your time. So to recap, I could submit the data to the table but issue was, it would submit in the wrong order. I just solved that because sometimes I get stuck on stupid and the following was wrong.
Employee_Number was after Case_Wildcard_Code. I moved it to...
Again, thanks for the reply. Used your code and got an error. Did quick watch to see if I could figure it out, still looking. 2 snippets attached of error and quick watch results
I'll continue to try to figure it out. May just start from scratch.
Thank you for the reply.
I put a different cmd button on the form to execute what you posted. Result is the .itemdata gets highlighted and compile error of invalid or unqualified reference. Again newbie here, I googled that and I'm assuming it needs the with statements. I add them back in and...
Posted this is the wrong place the first time. Hope this is the right place
HomeForumsProgrammersLanguagesVisual Basic (Classic) Forum
Insert Data into table from List box
thread222-1803655
Forum Search FAQs Links MVPs
Read
New Posts
Reply To
This Thread
Start A
New Thread
E-mail
Thread...
Hi all,
Just joined and hope to post correctly. Novice access programmer-still learning
My issue.
I have table (test1) with following fields. All set to text until I get it to work. They are in the following order
Case_code, Case_Type_Code, Case_Wildcard_Code, Employee_Number, Building_Code...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.