Hi,
I have a form called RequestInformation where users can insert new details and modify their existing details from data that is stored in my tables.
if a user inserts new data this becomes Version 1 and if a user amends minor changes to their details this becomes Version 2 and so on.
The users details are stored in the database so they can see all of their changes and previous details.
To see previous and current details on the RequestInformation form there is a combo box where the user can select Version 1, Version 2 and Version 3. If the user choose's version 1, they can view their first inputted details, if they choose Version 2 they can see the modified data, and Version 3 shows their latest amendments. Once the version is chosen by the user I want it to populate the correct textfields on the RequestInformation form, for example, age would populate the age textfield and forename would populate the forename textfield.
I'm having trouble with selecting a chosen Version, As this will be a large amount of code, i will just post the code for Version 1 as the rest will be the same, this is my code so far
any help would be appreciated
I have a form called RequestInformation where users can insert new details and modify their existing details from data that is stored in my tables.
if a user inserts new data this becomes Version 1 and if a user amends minor changes to their details this becomes Version 2 and so on.
The users details are stored in the database so they can see all of their changes and previous details.
To see previous and current details on the RequestInformation form there is a combo box where the user can select Version 1, Version 2 and Version 3. If the user choose's version 1, they can view their first inputted details, if they choose Version 2 they can see the modified data, and Version 3 shows their latest amendments. Once the version is chosen by the user I want it to populate the correct textfields on the RequestInformation form, for example, age would populate the age textfield and forename would populate the forename textfield.
I'm having trouble with selecting a chosen Version, As this will be a large amount of code, i will just post the code for Version 1 as the rest will be the same, this is my code so far
Code:
If (cmbVersion = "Version 1") Or cmbVersion = "Version 1" Then
CurrentDb.Execute "SELECT Personal_Details.ID, Personal_Details.Forename, Personal_Details.Surname, Personal_Details.Age, Personal_Details.Gender, " _
& "DeliveryDetails.Address1, DeliveryDetails.Address2, DeliveryDetails.PostCode, " _
& "FROM (Personal_Details INNER JOIN DeliveryDetails ON Personal_Details.ID = DeliverryDetails.ID) " _
& "WHERE(((Personal_Details.ID = DeliveryDetails.ID))) And (((Personal_Details.Version) = 1))"
end if
any help would be appreciated