[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

rehash of previous question- adding items to listbox and then to database

open database- a form comes up-
1.enter service no. ( hit enter or tab)
2.select name from dropdown box ( hit enter or tab)
3.enter part number into listbox- select items from drop down( and hit enter)
4. click command button to enter data into database.
problem:
I just changed command in click event  cmdAddtoDatabase_Cllick()
from Do Until x = Me.lstIds.ListCount
to Do Until x = Me.LstIds.ListCount-1
and thought that fixed - now am using it and not working
any more suggestions- thank you
data1.mdb
0
davetough
Asked:
davetough
  • 3
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
So, what exactly is not working ?

mx
0
 
davetoughAuthor Commented:
when you enter multiple serial numbers - it still inputes into the database and incorrect number of records- more than you enter- thank you
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
ok ... see if this works

mx
data1-MX01.zip
0
 
davetoughAuthor Commented:
thanks- great - works now
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
You are welcome.

Do you see what I change.
The Do/Loop wasn't necessary ...

For/Next ...

mx
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now