Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Form isn't opening to specified record

I have a command button on a form which when clicked is supposed to open a second form to a specified criteria.  Here is my code.  But it isn't working.  The second form is opening instead to the first record in the record source.  If a record doesn't exist yet for AssetN then the form is to open for a new record entry.

DoCmd.OpenForm "frmAssetRoomDetails", acNormal, "", [AssetN] = Me.txtAssetN, , acNormal

???
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SteveL13

ASKER

This worked...

DoCmd.OpenForm "frmAssetRoomDetails", acNormal, "", "[AssetN] =" & Me.txtAssetN, , acNormal

Thanks!