Calendar picker to 'auto-bound' with selected text box

ipaqAccess

Registered User.
Local time
Today, 08:54
Joined
Jun 13, 2011
Messages
11
Hi,

On my form, currently there are 6 'date' text boxes and one calendar picker that always display.

I would like the calendar picker to "auto-bound" to the selected text box, save the selected date and auto bound to other text box when you select to other text box.

As I'm new to Access and VBA, would appreciate if any could help on what should I do.

Thanks a lot !
 
Are you saying the other textbox need the same value from the first text box? If so then you can use the After Update Event behind the text box to set the values to the other text boxes.

Open the form in Design View then select the first textbox which you will use as the main one and open the properties, then select Events and then After Update, use the elipsee button and select Event Procedure
, Change the text box names. also take a copy of the database to test first. then type in

me.textbox2Name=me.textbox1Name
me.textbox3Name=me.textbox1Name

and so on.
 
Hi Trevor,

Thanks for your help. But it's not. These 6 text boxes do not hold the same value.
E.g I have a list of items. Each items have Buying Date, Shipping date, Deliver date, Return Date..etc.. So everyday store admin will go through the list and update the date of each items. So instead of click on each text box, then click the day picker item then choose the date. To save time for them as the list is quite long, I want to have the date picker is always visible and they only need to click on the text box and then choose the date. => so I need the date picker will be bound to the selected text box.

Thanks.
 
Which access version are you using? From A2007 and onwards there is the built-in datepicker for textboxes set to Date format
 
Hi,
Hi,

I'm using Access 2010. I know that the date picker for text box are built in for text box. But you need to click many times to select the date. So what I'm trying to do is to have a date picker always appear and save sometimes for the store admin as she need to run through about 400 items and update the date for each items daily...
 
I understand Trevor's confusion here! I've read this thing a half dozen times and I'm still not exactly sure about what you want to accomplish!

Obviously the DatePicker can only be Bound to one Field in your underlying Table, not six! A better explanation of what you're trying to do here is needed, in order for us to help you.

I'll hazard a guess that you want to be able to
  1. Click (or better yet, Double-Click) into a Textbox
  2. Have the Focus go to the single DatePicker
  3. Pick a date and have that date populate the Textbox you Double-Clicked on previously
If this is your situation, something like this, for each Textbox's DoubleClick event
Code:
Private Sub YourTextBoxName _DblClick(Cancel As Integer)
  YourDatePickerName.SetFocus  
End Sub

Private Sub YourDatePickerName_Click()
  Screen.PreviousControl = YourDatePickerName.Value 
  YourTextBoxName.SetFocus 
End Sub
Linq ;0)>
 
Hi,

Thanks for your help. Sorry I was busy with another project that couldnt take a look into this till now.

I have attached the file that I'm currently working on.
So what I want to do is under form FA Date Update.
There are about 12 text box that display date. User will have to select one by one item on 'Parts' list box and update the date for that item.
What I want access to do is that whenever the user select the part and select the text box to update 'date' - Instead of the usual way (which is he will select the date picker that usually show next to the text box and then select the day), I want he only need to click on the date at the day picker that already there and it will auto save the value into the record and then continue to work with other parts. That's why I want the date picker to bound to the selected textbox.
(hope I explain clear enough :D). It might sounds unnecessary but it would save a lot of time if you have to work with 600 parts everyday - That's my reason :D.Beside, if you could help, I couldnt manage to code it to save the record. I tried to google and a few ways like using Macro and dirty properties but it didnt work. Dont know where I was wrong.!!! Please helps!!!!
 

Attachments

@missinglinq: I tried your guide but unable to make it work. Wonder if the issue may be the Screen.PreviousControl? but have no answer for it.

Thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom