Getting / Manipulating Data From Another table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to update the current table with a number contained in another
table, then add 1 to
The source table number so that the number will be unique for the next
record added.
The tables do have a relationship established.

Simply –


Location_ID
Source_Number


Location_ID
Destination_Number


I want the value of source number in destination number, (If Destination is
Blank), then add 1 to Source Number. Tables have a relationship by
Location_ID.

I have played with this – but keep getting errors! Help!!

Thanks

Robbie
 
I have the tables linked - thats not my problem - i want to get the # from
the 2nd table, put in the first table, then add 1 to the number in the source
table so I have a unique number for the next record added in the source table
- with the same location ID. Note - autonummber will not work - since
numbers have to be by location ID.
 
This is what I am Trying to do -

Private Sub Indictment___BeforeUpdate(Cancel As Integer)
If IsNull(Me![Indictment #]) = True Then
Me![Indictment #] = Counties![indictment # 2]
Counties![indictment # 2] = Counties![indictment # 2] + 1
End If


End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top