hmmm...
The multiple users issue is a little trickier, because with only one table,
every user would be adding to the same table and that would create problems.
The other problem is that neither a query or a table of any kind will update
your tables if they are not bound to the form, so this is sort of like using
an unbound form. That is why I asked about your VBA experience. This is the
only way you are going to be able to do what you want.
I don't have time to write all the code for you, but here are a few pointers.
First you will have to open the tables you need to update as dbOpenDynasets
Dim rstTableOne as Recordset
Dim rstTableTwo as Recordset
Set rstTableOne = CurrentDb.OpenRecordset("FirstTableName", dbOpenDynaset)
Set rstTableTwo = CurrentDb.OpenRecordset("SecondTableName", dbOpenDynaset)
Now, once you have all the data in, you will need a command button to
actually do the updates. You would put the code to do the updates in the
Click event of the command button. This code doesn't do any error handling
or validation. You will have to add that.
First, you need to determine whether it is a new record:
strFind = "[FIELD_NAME_TO_MATCH_1] = '" Me.txtFirstField & "' AND
[FIELD_NAME_TO_MATCH_2] = '" & Me.txtSecondField & "'"
With rstTableOne
.FindFirst strFind
If .NoMatch Then
.AddNew
Else
.Edit
End If
!FieldOne = Me.txtSomeField
!FieldTwo = Me.txtAnotherField
.Update
End With
And do the other table the same way.
Good luck! This is a great learning experience for you
> I created a select query using a crosstab and another necessary query but it
> still recognized it as a crosstab and wouldn't let me update my form so I
[quoted text clipped - 34 lines]
> > > > > table in DAO. Can you give me some direction? I'm not even sure where I
> > > > > begin to write the code in the f_PrimaryEntry form. Thanks a ton!
Tracy - 01 Sep 2005 22:07 GMT
Klatuu, Thanks for the information. So, what you're saying is that the form
will be unbound so I'll be using no record source but entering the code.
Where do I put the code on the f_PrimaryEntry form that you began with shown
below? Or is that wrong and I do use a make table query and bind it to my
form but I put in the code and command button as well?
Dim rstTableOne as Recordset
Dim rstTableTwo as Recordset
Set rstTableOne = CurrentDb.OpenRecordset("FirstTableName", dbOpenDynaset)
Set rstTableTwo = CurrentDb.OpenRecordset("SecondTableName", dbOpenDynaset)
Sorry to be a pain... I appreciate your help.
Tracy
> hmmm...
> The multiple users issue is a little trickier, because with only one table,
[quoted text clipped - 74 lines]
> > > > > > table in DAO. Can you give me some direction? I'm not even sure where I
> > > > > > begin to write the code in the f_PrimaryEntry form. Thanks a ton!