Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 25th, 2003, 09:15 AM
Monkeymafia Monkeymafia is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 Monkeymafia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
MS Access record manipulation with vba

Hi,

I've got an access database containing several tables containing the same fields but for different companies. I've created a form to allow users to enter information which is added as a new record to the appropriate table (e.g. if cboCompany.Value = "Company A" then store data from other fields into table "tblCompanyA"). I create the new records using DoCmd.RunSQL "INSERT INTO and it works fine.

My problem is that I want to be able to read the value from the primary key (autonumber) field for the new record, so that I can store it to a variable and show it to the user (it's a unique number for correspondence tracking). I've tried looking around for techniques but am not having much luck. I think the sql query ident_current is what I need to use, but can't work out how.

FYI, I'm writing the VBA code from Access 2002 on WinXP.

Any help will be glady received.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > MS Access record manipulation with vba


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway