help with the Easiest way to finding where in the list (1 Viewer)

Gint32

Registered User.
Local time
Today, 08:04
Joined
Jan 21, 2018
Messages
39
Sorry about that. I uploaded the wrong version

New form OT_Board_New with a record source using new query qryAssRank (with Serialize function).
I've left all _old items but once you're happy with this those can be deleted

Have modified test data dates so these included today's date
I've added the AssRank field to the left of the form and made the Shift Hours visible so I could easily enter data

As far as I understand it the form is taking data for today's date only so I've based my solution on that. If not, it will need further tweaking later.

FIXED version attached

Hi Ridders,
Just a quick observation/question, the form and qry you supplied works well if you wish to only use the current date(today), but I wish it to not just take the records for the current date only, I originally had it open up to a user date selection via a datepicking form so as when the user clicked the textbox = txt_OTDate on the form ,they could then jump to those records for the date selected.
I noticed that you commented this out, but this was and needs to be big part of the functionality. So I attempted to alter your query/criteria by changing one field from = date() to > = Forms![ot_board]![txt_OTDate], and thought it would be a simple as that, but not as I am now getting the same errors once again now
Code:
InputDateField txt_OTDate, "Select A Date to view Availability for O/T"
 

isladogs

MVP / VIP
Local time
Today, 16:04
Joined
Jan 14, 2017
Messages
18,209
Hi Ridders,
Just a quick observation/question, the form and qry you supplied works well if you wish to only use the current date(today), but I wish it to not just take the records for the current date only, I originally had it open up to a user date selection via a datepicking form so as when the user clicked the textbox = txt_OTDate on the form ,they could then jump to those records for the date selected.
I noticed that you commented this out, but this was and needs to be big part of the functionality. So I attempted to alter your query/criteria by changing one field from = date() to > = Forms![ot_board]![txt_OTDate], and thought it would be a simple as that, but not as I am now getting the same errors once again now
Code:
InputDateField txt_OTDate, "Select A Date to view Availability for O/T"

I'd forgotten all about this as its 2 weeks on.

When I posted my solution I stated:
As far as I understand it the form is taking data for today's date only so I've based my solution on that. If not, it will need further tweaking later.

The InputDateField code was disabled by you before you uploaded it
I recognise that code as its used in my 'Better Date Picker' which I posted here https://www.access-programmers.co.uk/forums/showthread.php?t=298062
I've just re-enabled the code but the required module & form needed for it to work had been omitted by you

So I've restored the frmDatePicker & modDatePicker items & it works again
I've also added a Change Date button to the form so you can do that easily

It runs without error
 

Attachments

  • 4RUpload_CR_UPDATED_20180509.zip
    282.7 KB · Views: 86

Gint32

Registered User.
Local time
Today, 08:04
Joined
Jan 21, 2018
Messages
39
I'd forgotten all about this as its 2 weeks on.

When I posted my solution I stated:


The InputDateField code was disabled by you before you uploaded it
I recognise that code as its used in my 'Better Date Picker' which I posted here https://www.access-programmers.co.uk/forums/showthread.php?t=298062
I've just re-enabled the code but the required module & form needed for it to work had been omitted by you

So I've restored the frmDatePicker & modDatePicker items & it works again
I've also added a Change Date button to the form so you can do that easily

It runs without error

Thanks, I downloaded and yes the date does change but the records that are returned are for the same date, i can't see where in the VBA you are passing the new selected date to the exist query, would you mind clarifying how this is achieved.
As I said before I attempted to do this myself with using
Code:
= Forms![ot_board]![txt_OTDate]
within the query AssRank but as I say it fails.
 

isladogs

MVP / VIP
Local time
Today, 16:04
Joined
Jan 14, 2017
Messages
18,209
Try this modified version.

It now seems to be updating correctly & once again without errors.
Test it with your real data

BTW there are other issues with your form e.g. #Name in the bottom left that I'll leave you to sort out
 

Attachments

  • 4RUpload_CR_UPDATED_20180509_v2.zip
    292.4 KB · Views: 89
Last edited:

Gint32

Registered User.
Local time
Today, 08:04
Joined
Jan 21, 2018
Messages
39
Try this modified version.

It now seems to be updating correctly & once again without errors.
Test it with your real data

BTW there are other issues with your form e.g. #Name in the bottom left that I'll leave you to sort out

Ridders, Thanks once again for your speedy responses and working solution!
 

isladogs

MVP / VIP
Local time
Today, 16:04
Joined
Jan 14, 2017
Messages
18,209
You're welcome.
Glad its now working to your satisfaction!
 

Users who are viewing this thread

Top Bottom