Problem with linking two forms for an interactive survey application

  • Thread starter Kristen M via AccessMonster.com
  • Start date
K

Kristen M via AccessMonster.com

I have created an application in Access using two forms in Access called
frmCountyInterface (form1) and frmSurvey (form2). One table (tblSurvey)
collects all survey data (from both forms) and an autoID is assigned for each
survey taken. In tblSurvey, the fields "County" and "City" are obtained from
form1 and "Ques1" - "Ques16" are obtained from form2.

In the form frmCountyInterface, I have 16 tabs that collects locational data
from each survey respondent, then because I ran out of space I had to use a
second form and therefore needed to:
1) close frmCountyInterface
2) open frmSurvey and go to the same record I was on when I closed
frmCountyInterface

The code that I used is located in a separate module:
Public Sub modCloseSaveOpen()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenForm "frmSurvey"
DoCmd.Close acForm, "frmCountyInterface", acSaveYes
End Sub

This has been working and I thought it was fine, until just recently I had
been noticing some problems.

Problem:
The survey using both forms had been working fine until I noticed that after
13 people had taken the survey, the fourteenth person would start the survey
on form1 and when it would switch over to form2, the answers on the form were
already filled in with person #13's answers.

When I look at the table, all answers are filled out correctly for the first
13 respondents, after that "County" and "City" are recorded and all
subsequent answers write over the answers for person 13.

I had tried to put all questions onto one form, but the first form has 16
tabs and numerous graphics, labels and coding and sadly cannot be combined
with the rest of the survey on one form.

Please let me know if you have any suggestions on how to jump from one survey
to the next and stay on the same record.
 
Top