copy text/data

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

Guest

Hello,

I have created a form that asks the user to input an address (into unbound
text boxes) which then queries my main form for existing records based on
that address. I would like to know if there is a way to have it automatically
populate the address fields in the main form if there are no
existing/matching records (automatically creating a new record). Thx. :)
 
Hsdaguilar,

Here's the skeleton of one possible approach...

If DCount("*","YourTable","[Address]='" & Me.txtAddress & "'")=0 Then
CurrentDb.Execute "INSERT INTO YourTable ( Address ) VALUES ( '" &
Me.Address & "' )"
End If
 
Back
Top