Rabu, 11 September 2013

[MS_AccessPros] Subform to show last entered record or show Maximum of ID

 

Dear All,

I've a Master form with subform in it, they are linked (one-to-many relation) with fields as normally we do.User can make entries through this form and it is working fine. Following is the structure of tables which Master/Detail form based on:

Master:
m_id (Primary Key Autonumber)
compID (Number)
DateRecvd: (Date/Time)

Detail:
m_id (Foreign Key Number)
StatusID (Number)

User makes entry for Company (compID) in Master Part, and enter Status (1 to 8) in different intervals, for e.g. User makes new entry for Company ID 1 and DateRecvd 09-09-2013 and enter Status 1, next day when user received updates for particular Company he search for that record for Company ID 1 and enter Status 2 and so on till Status reach to 8.

Now the problem, what I need is when user search or navigate through records, the Subform needs to show only last entered Status, example: if user previously entered 1 and 2 and he searches for the record then the form should show only 2, he then enters 3, next time when he searches the record subform should show 3 and so on.

Is there anyway to do it? I've tried to make query for subform datasource and use Max function for StatusID but it turns out using aggregate function makes subform read-only.

Looking forward to receive expert advises as always.

Thanks

Ahmed

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar