I have a command button in a menu that I currently have set to open a an input form.
I would much prefer, if it were possible, that when the user clicked on the Command button, a command box came up prompting them for the MemberID that they wished to display the record for. Once input, the form would open with this record specifically.
dim wantedMemID as string ' if MemberID is a string else long, integer
identical to the fieldsetting where to search
rst = Db.OpenRecordset("tbl........", dbOpenTable) ' indexes available
by use of
rst.index ="PrimaryKey" ' or any wanted index just the fieldname if
place here the code to get Your MemberID in wantedMemID
rst.seek "=" wantedMemID ' record pointer moves to the required record
if this field is unique, else it moves to the first
Me!requery ' = me is form that wil be updated with de record source
But erm, Dont hurt me but could I have that dumbed down or elabourated upon please. I have pretty much no Visual basic language or psudo code in my mind, therefore reading that it was hard to pick out things that I should change. For example.
remarks : if MemberID is indexed as a primarykey then Seek will
point to the exact record, the same result as the
field has uniqueness, in all other cases it will point to the
first of the sequence.
if the MemberID doesn´t exist then nothing will be found
and Rst.EOF wil not be set in that case you can you use :