Hello Khalid
I am not John, but I hope I have a solution in my pocket that might serve your purpose ;-)
Attach an event procedure to the AfterUpdate event of your combo box which checks if you are on a new record and, if so, sets the DefaultValue of the combo box to the newly selected value.
Something like this:
Private Sub ProductName_AfterUpdate()
If Me.NewRecord Then
ProductName.DefaultValue = ProductName
End If
End Sub
If ProductName is a text field, then you must surround the value with quotes:
ProductName.DefaultValue = Chr(34) & ProductName & Chr(34)
Best wishes,
Graham
[Access MVP 1996-2013]
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Khalid Tanweer
Sent: Monday, 25 November 2013 21:10
To: ms_access_professionals@yahoogroups.com
Subject: [MS_AccessPros] On form data entry desired fields input fills new row
John,
Hope you would be fine. Here i am with one situation to be resolved if there is any solution & i am rest assured you have in some of your pocket available for me.
On my form "Collection Voucher" I have a Combo box: ProductName, often a situation arises that for a specific "ClientCIN" he has say 100 cartons of same ProductName (with unique cartonNo and different weights).
So i need in this situation if i had selected any ProductName on first entry on the next rows it should fill with the same ProductName untill i need to change different ProductName, instead of selecting again and again from combo box or typing few alphabets to get the required ProductName
Regards,
Khalid
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar