need to populate column based on combobox

HRakibul

Registered User.
Local time
Today, 06:39
Joined
Feb 10, 2014
Messages
41
hi,
i need automatically input date into separate column based on combobox selection.

like , i select option "ASKED"= column "ReqDate" will fill up by present date.
if i select opiton "Sent"= column "SentDate"will fill up by present date.
-----------

please see the attachment for ref.

thanks.
 

Attachments

  • screen shot.jpg
    screen shot.jpg
    81 KB · Views: 95
Add code similar to this

Code:
Private Sub Status_AfterUpdate()

Select Case Status

Case "ASKED"
Me.ReqDate=Date

Case "SENT"
Me.SentDate=Date

End Select

End Sub
 
Dear isla,
complie error is showing.

method and data member not found


what to do?
 

Attachments

  • screen shot 2.JPG
    screen shot 2.JPG
    32.8 KB · Views: 85
Possibly because your control appears to be called SendDate and you said SentDate?

YOU have to match the names to the sample code supplied.
 
It needs the same control name for both the after update event and the select case.
Only you know whether that should be cboStatus or Status.

You ma also want to add similar code for the case 'RECEIVED'

Also you should have 'Option Explicit' as the second line of each code module after 'Option Compare Database'
 
dear Gasman,

no it is not working

please see the screen shot
 

Attachments

  • screen shot 2.JPG
    screen shot 2.JPG
    32.5 KB · Views: 86

Users who are viewing this thread

Back
Top Bottom