1) I have form for data entry (data entry = yes), so it creates new ID on new records. (to create new orders)
2) this form has listbox, for search purposes if the records were already entered in database table. So double click (list box specefic record) will populate form with exactly same data on the form (except the ID field, it will be new).
Problem: a) I can not link with ID, it will act as new entry. b) if column width of a field is zero, then column number also wont work.
Little explanation:
It was working perfectly fine by (example)
But this does not work for those fields whose column width in listbox is zero (for example Foriegen keys). But I must want to populate in the form.
Basically at first orders are created at 1st, afterwards time comes, when same orders (with same details) have to be re-ordered. So list box serve as search function, and double click will serve to autopopulate to make re-order process quick. Because it will act as new order, new ID so I can not link fields ID basis.
Lisbox source is query.
2) this form has listbox, for search purposes if the records were already entered in database table. So double click (list box specefic record) will populate form with exactly same data on the form (except the ID field, it will be new).
Problem: a) I can not link with ID, it will act as new entry. b) if column width of a field is zero, then column number also wont work.
Little explanation:
It was working perfectly fine by (example)
Code:
Forms!Form1.Field1.Value = Me.ListboxName.Column(4)
Basically at first orders are created at 1st, afterwards time comes, when same orders (with same details) have to be re-ordered. So list box serve as search function, and double click will serve to autopopulate to make re-order process quick. Because it will act as new order, new ID so I can not link fields ID basis.
Lisbox source is query.