Hi all,
I am attaching a small db file to get some help with a new approach I am trying to take with my project. Currently, I have the user doing input to a similar dialog with a subform of dates (some of you have been a big help on that form). Anyway, he's finding that a little cumbersome, so I'd like to give him a quicker option, clicking with his mouse or finger on the list box rather than writing data.
The dates collected need to be added to a table called tblIODetails_Dates. I thought the best approach is to collect his lstChooseDates input into a temporary table which is created when the dialog opens, and when the user finishes selecting dates in the lstChooseDates and closes the dialog, those records in the temp table are appended to the permanent tblIODetails_Dates table, the txtResult contents get written to the calling form and the temp table is deleted.
My first issue is that TempDates table isn't always created on opening Form1. It opens properly when I first open the database (Form1 auto-opens), and from form design only. When I open Form1 from the Navigation Pane, the TempDates table isn't created. Don't know what's going on there.
You won't have this issue when you open my little test db, so, you can input the start and end dates, and some Detail_ID, then click the LIST Dates button
Next issue: As you make listbox selections, I need the txtResult to format the dates simply as 'm/d' (for the sake of room). Can't figure out how to do this.
Finally, how to get the selected dates, along with the Detail_ID to append to tblIODetails_Dates table. The Insert into the permanent table needs to make sure it is not writing a duplicate Detail_ID and Air_Date, if the user has come back to add a date missed on the first pass and reselects previously selected dates.
I may be opening a can of worms here. The listbox needs to populate with all dates between txtStartDate and txtEndDate. Could the listbox show previously recorded dates as 'selected' when the list populates?
Any help you all can give me with this would be greatly appreciated. If there is a better approach, I'd welcome that too.
Thanks!
MIB1019
I am attaching a small db file to get some help with a new approach I am trying to take with my project. Currently, I have the user doing input to a similar dialog with a subform of dates (some of you have been a big help on that form). Anyway, he's finding that a little cumbersome, so I'd like to give him a quicker option, clicking with his mouse or finger on the list box rather than writing data.
The dates collected need to be added to a table called tblIODetails_Dates. I thought the best approach is to collect his lstChooseDates input into a temporary table which is created when the dialog opens, and when the user finishes selecting dates in the lstChooseDates and closes the dialog, those records in the temp table are appended to the permanent tblIODetails_Dates table, the txtResult contents get written to the calling form and the temp table is deleted.
My first issue is that TempDates table isn't always created on opening Form1. It opens properly when I first open the database (Form1 auto-opens), and from form design only. When I open Form1 from the Navigation Pane, the TempDates table isn't created. Don't know what's going on there.
You won't have this issue when you open my little test db, so, you can input the start and end dates, and some Detail_ID, then click the LIST Dates button
Next issue: As you make listbox selections, I need the txtResult to format the dates simply as 'm/d' (for the sake of room). Can't figure out how to do this.
Finally, how to get the selected dates, along with the Detail_ID to append to tblIODetails_Dates table. The Insert into the permanent table needs to make sure it is not writing a duplicate Detail_ID and Air_Date, if the user has come back to add a date missed on the first pass and reselects previously selected dates.
I may be opening a can of worms here. The listbox needs to populate with all dates between txtStartDate and txtEndDate. Could the listbox show previously recorded dates as 'selected' when the list populates?
Any help you all can give me with this would be greatly appreciated. If there is a better approach, I'd welcome that too.
Thanks!
MIB1019