Jan-
Yes, build a query as instructed and use it as the Record Source of your form. Yes, a "Tabular" form build by the Form Wizard is a Continuous Form. You can use the Form Wizard to help you get started. After you have the form built, open it in Design View and add a Command Button control to the Detail section. To add code to respond to the Click event, select the command button, open the Properties window, and change the On Click property to [Event Procedure] - then click the Build (…) button next to the property to open the VB Editor with skeleton code started. Add the code I suggested.
When you use the form and see a "match", click the command button to get the record in Patrons updated with the Voter ID.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Apr 13, 2015, at 9:32 PM, jan.hertzsch@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Hi John:
You are correct that I cannot define a unique key based on the combination of Last Name, House Number, and Street Name. I see what you are getting at now. There would be one record in Patron but multiple records in Voter_IDs so it confuses Access.
- VoterID in the RegisteredVoters table is unique
- I can use the Autonumber primary key from Patrons.
These are the steps you list.
- First, I assume VoterID in the RegisteredVoters table is unique.
- You also need some unique field (can be an artificial AutoNumber) that you can define as the Primary Key of the Patrons table.
- Now put your query in a Continuous Form and be sure the query includes the PatronID AutoNumber field and the VoterID field from the RegisteredVoters table but NOT the VoterID from the Patrons table.
- On each row, list the First, Last, House Number, and Street Name fields from both tables.
- Add a command button on the row, and behind the Click event of the button, put this bit of code: <code followed>
Questions:
- Do I make the query and use that as the basis for the form or are you referring to the construction of the form as the query?
- Am I correct that Continuous Form in Access 2007 is just Tabular view?
- I am afraid I don't know how or where to add the code for the command button.
I appreciate your help.
Thanks
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar