Link to home
Start Free TrialLog in
Avatar of Reyesrj
ReyesrjFlag for Guam

asked on

MS Access

Hi all,

I have a MS Access database (see attached).

The frmClassEntry from is where I enter members who attend a workout class.  When I enter the Member ID and hit enter the data below populates with the member’s name.  If I don’t know the member’s ID number then I click on the Search Member button and the form frmSearchMember opens.  Then I lookup the members name to find the Member ID number and then I switch back to the frmClassEntry to enter the Member ID.

How do I use the frmSearchMember to search for the member by using one any of the text boxes and clicking on the record and then it gets entered in to the frmClassEntry from.
DataEntry.accdb
Avatar of COACHMAN99
COACHMAN99

You can use a global variable, that is set to zero when you open frmSearchMember , and set to a valid ID when you close frmSearchMember.
When frmClassEntry gets the focus, if the Member ID is empty and the global is valid, then assign the global to the Member ID field.

there are probably many other (some more elegant) ways, but this is how I do it.
Avatar of Reyesrj

ASKER

Thank you Coachman99,

I'm new at this and I've been getting tips and bits of help from people and internet searching.  Yes, I agree, there are better ways of doing this.  I welcome and appreciate any and all suggestions.  If possible could you upload samples and instructions.
ASKER CERTIFIED SOLUTION
Avatar of COACHMAN99
COACHMAN99

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 Reyesrj

ASKER

I'm too new to VBA to understand the suggestions.

This is the only answer given
Avatar of Helen Feddema
I made a copy of your form, called frmMembersInfo, with two combo box record selectors in the header, one for selecting by Member ID, and the other for selecting by name.  This will work, as far as selecting members is concerned, but a lot more work is needed, started with normalizing the tables and setting up appropriate relationships.  I gave the form a record source of just tblMembers, but that means that some controls lack record sources.  The normalization should be done first, before fixing that problem.
HBF-Modified-DataEntry.accdb