Re: Concatenate field as PK
- From: sebastico <sebastico@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Aug 2007 15:42:02 -0700
Dear Steve
Many thanks for your kindness. However, my CodSig must be the concatenation
of fields: Prov, Cant, Dist, Bloq, Sect and NumParc.
Have you got another sugg.
"Steve" wrote:
You can make it easy on yourself by adding a field named SigNumID to your.
table and making it autonumber. It will self-populate when you add the field
and will self-populate when you add new records.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@xxxxxxxxxxxxxxx
"sebastico" <sebastico@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:18E17DD3-8B06-45DA-B65B-72F7899C0E30@xxxxxxxxxxxxxxxx
Dear all
I have the Table SigNum with the fields:
CodSig (PK) (string)
Prov (string)
Cant (string)
Dist (string)
Bloq (string)
Sec (string)
NumPar (string)
The PK must be the combination of fields Prov, Cant, Dist, Bloq, Sec
NumPar
I have the code:
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "FirstField = " & Me.TextBox1 & " " & _
"AND SecondField = " & Me.TextBox2 & " " & _
"AND ThirdField = " & Me.TextBox3 & " " & _
"AND FourthField = " & Me.TextBox4 & " " & _
"AND FifthField = " & Me.TextBox5 & " " & _
"AND SixthField = " & Me.TextBox6 & " " & _
DoCmd.OpenReport "MyReport", acViewPreview, , strWhere
End If
End Sub
However, in the form (based on the Table SigNum) when I type a value in
the
fields the PK field does not display it. I need that when I type a value
in a
field, the PK field automatically display it. How do I do this?
Help please
Many thanks in advance.
- Follow-Ups:
- Re: Concatenate field as PK
- From: Steve
- Re: Concatenate field as PK
- References:
- Re: Concatenate field as PK
- From: Steve
- Re: Concatenate field as PK
- Prev by Date: Re: Concatenate field as PK
- Next by Date: Memo Type issues
- Previous by thread: Re: Concatenate field as PK
- Next by thread: Re: Concatenate field as PK
- Index(es):
Relevant Pages
|