473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Form that pulls from two seperate tables to compare data?

I have a database which consists of tblMaster, tblMasterReplica, frmMaster (to display info from tblMaster), frmChange (to make changes to data, which are saved to tblMasterReplica). I also have a tblAudit (tracks changes made to the tblMasterReplica).

I need to create a form to display the data from only one entry from both the tblMaster & tblMasterReplica (two rows of data--only record that changed and original data). I want it to be two columns (ex. "Old Data & Updated Data") in between the two rows I want an approve and a deny button. If approve is clicked, the updated data will override the old data in the tblMaster, if the deny button is selected I want the information to revert back to what it was in the tblMasterReplica.

My knowledge of access is limited as this is the first database I have attempted to create so all of your help/advice is very much appreciated!

Thank You.
Jul 30 '12 #1
1 2139
twinnyfo
3,653 Expert Mod 2GB
jswag789,

Keeping your vision in mind, I would begin by creating a master form called frmMaster, based on tblMaster, with all the controls (text boxes, etc.) on the left hand side of the form. I would keep the right hand side of the form blank.

Next, create another form, nearly identical to that first form (if the field names of the two tables are identical, you could copy that form) and save as fsubReplica. Its record source should be tblMasterReplica. Move the controls on fsubReplica over to the right a bit and add command buttons to the left of each of your controls.

Insert fsubReplica into frmMaster as a subform and link the two forms Master/Child fields based on the Primary Key of tblMaster. Simply align the text fields so they correspond to each other (you'll have to see this in form view, rather than design view.

The code behind your command buttons would be quite simple:

Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2. Option Compare Database
  3.  
  4. Private Sub cmdAcceptChange1_Click()
  5. On Error GoTo EH
  6.     Me.Parent.txtField1 = Me.txtField1
  7.     Exit Sub
  8. EH:
  9.     MsgBox Err.Number & " " & Err.Description, vbCritical, "Error!"
  10.     Exit Sub
  11. End Sub
  12.  
You would have simlilar code for each command button for each text field. I'm not sure you really need a deny button, because your tblMaster should be unaffected by any denials. Users should only be allowed to change tblMasterReplica. However, the deny button to change tblMasterReplica back to the original would have very similar code.

Hope this gets you started....
Jul 30 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ewin | last post by:
I'm a beginner user of MS Access, and I am having a problem building a database with a complex form that enters to several tables. I did not use subforms because I am attempting to emulate...
2
by: Tolu | last post by:
Hello I am trying to save information from one form to two tables. I have a table for Student info and Transcript line. I have a form that list all the classes (using text boxes) a student is...
1
by: Mark | last post by:
by m.r.davies I have 2 tables on seperate Db's (and servers) I want to use a datareader on the first table to pick the booking ref, and then use that booking ref to query the 2nd DB when i have...
8
by: fonzie | last post by:
Is it possible to have a data entry form where the information is stored in several different tables (5 or 6)? I have an inventory database where Table1 stores all of the data common to all...
3
by: kcddoorman | last post by:
I'm making a shop order entry system. Basically I take a work order that a sales person writes and rewrite into a door builders language. I'm having trouble with the form's record source. I have...
11
by: khushbubhalla | last post by:
how to compare data between tables and views row by row , column by column in the test and production environment
5
by: Markw | last post by:
Hello Folks, It's your new mysql and php user looking for some more help. Background: I'm attempting to develop an online SCUBA Diving Log application. My plans are to put it together in pieces...
4
by: wideasleep | last post by:
Hello, I have a situation where I have been asked to combine two tables and make a form to continue to enter data. I have created a relationship between the tables and have gotten to creating the...
5
by: chazzy69 | last post by:
Ok heres what im trying to achive i am constantly updating the information in a table but know i what know if the data im replacing it with is new, i.e. whether or not i already had the data in the...
0
by: silaj | last post by:
Hi i want to compare data in the list box with the database connected with vb.net. if it match it send a positive signal to a serial port attach with automatic door. can any body help me i will be...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.