PC Review


Reply
Thread Tools Rate Thread

Add New Record

 
 
Zanstemic
Guest
Posts: n/a
 
      29th Sep 2008
This is for a Create Record Button:

The button is on the main form Authorization and it creates a new record for
Trip Report. These records are related through AuthorizationID.

The intent is to create a NEW RECORD in Trip Report if one has not been
added or OPEN an existing record with the same AuthorizationID it already
exists.

Any suggestions are appreciated.
 
Reply With Quote
 
 
 
 
Zanstemic
Guest
Posts: n/a
 
      30th Sep 2008
After the form opens, I'm trying the following in the Load Event of the form

Dim lngID As Long
If Len(Trim(Nz(Me.txtAuthorizationID, ""))) > 0 Then
lngID = CLng(Me.txtAuthorizationID)
If lngID <> 0 Then
Me.RecordsetClone.FindFirst "AuthorizationID=" & lngID
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
Else
If Not Me.NewRecord Then
DoCmd.RunCommand acCmdRecordsGoToNew
End If
End If
End If
End If

It's erroring on Me.RecordsetClone.FindFirst "AuthorizationID=" & lngID

I'm not sure if this is the best approach so any suggestions are appreciated.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Record in query, save as New Record then edit New Record spreadsheetlady Microsoft Access 1 26th Jan 2010 09:41 PM
adding a new record at subform should update an existing record (not create new record) Mark Kubicki Microsoft Access Form Coding 1 16th Jan 2009 08:34 AM
Find Record action to display a record that is the current record on another for Tom K via AccessMonster.com Microsoft Access Macros 0 31st Oct 2005 07:45 PM
Current Record Count, Previous Record #, Add New Record =?Utf-8?B?Um9iZXJ0IE51c3ogQCBEUFM=?= Microsoft Access Forms 0 15th Feb 2005 08:35 PM
I am trying to get a form to pick up the record data from a different record to this new record Thomas Simsion Microsoft Access Forms 4 10th Nov 2003 09:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:09 AM.