I am new to VBA, but here is what i want to accomplish.
I have 1 form and 2 tables.
Form uses table 1 to store data (first,last,address,tel.site (a), sit (b)
eash site has a unique number..)
Table 2 stores site information and unique number( range number for site (a)
is 1 to 1000 range for site (b) 1000 to 4000).
How do i increment the number by one every time a new record is added to a
site. For example first record is site (a) is 1000, next time i add a record
for site(a) number must be 10002 and same for site (b).
Please help thanks
|
|
0
|
|
|
|
Reply
|
Utf
|
2/27/2007 3:31:00 AM |
|
Hey learner,
You would need to decide where you wanted to place this to get it to
increment by one by this should work for you.
Nz(DMax("[NameOfField]", "NameOfTable", ""), 0) + 1
HTH,
Shane
learner wrote:
>I am new to VBA, but here is what i want to accomplish.
>I have 1 form and 2 tables.
>
>Form uses table 1 to store data (first,last,address,tel.site (a), sit (b)
>eash site has a unique number..)
>
>Table 2 stores site information and unique number( range number for site (a)
>is 1 to 1000 range for site (b) 1000 to 4000).
>How do i increment the number by one every time a new record is added to a
>site. For example first record is site (a) is 1000, next time i add a record
>for site(a) number must be 10002 and same for site (b).
>
>Please help thanks
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200702/1
|
|
0
|
|
|
|
Reply
|
shanesullaway
|
2/27/2007 5:48:16 AM
|
|
|
1 Replies
978 Views
(page loaded in 0.101 seconds)
Similiar Articles: using vba to update record in another table - microsoft.public ...I am new to VBA, but here is what i want to accomplish. I have 1 form and 2 tables. Form uses table 1 to store data (first,last,address,tel.site (a),... insert record from list box to table do i need to use vba ...using vba to update record in another table - microsoft.public ... insert record from list box to table do i need to use vba ..... txtstate, cmbzip i have another ... back ... Update Query in VBA - microsoft.public.accessusing vba to update record in another table ... access... record(s) were updated ... Visual Basic for Applications (VBA) > Update an MS Access Table Field using VBA ... Using email to update Table records - microsoft.public.access ...using vba to update record in another table - microsoft.public ... Using email to update Table records - microsoft.public.access ..... table - dBforums I'm trying to ... MS Excel VBA Pivot table link cell fetch records - microsoft ...using vba to update record in another table - microsoft.public ... MS Excel VBA Pivot table link cell fetch records - microsoft ..... double click on this value, MS Excel ... How to link tables using VBA - microsoft.public.access.forms ...using vba to update record in another table - microsoft.public ... How to link tables using VBA - microsoft.public.access.forms ..... VBA ... table ... using References ... Insert, copy, update, delete records through VBA - microsoft ...using vba to update record in another table - microsoft.public ..... Message posted via ... to use vba ... Visual Basic for Applications (VBA ... ... need to insert ... ... Delete record using vba - microsoft.public.accessusing vba to update record in another table - microsoft.public ... How to: Insert, Update, and Delete Records From a Table Using ... VBA ... When you are inserting records ... Updating related tables (parent / child) records using VBA ...Creating a customer record in a child table - microsoft.public ..... have some VBA ... Using email to update Table records - microsoft ... ... with the tables Customers ... using vba to loop an insert query until all records in query are d ...using vba to update record in another table - microsoft.public ... using vba to loop an insert query until all records in query are d ..... rt!Seat = i rt.Update ... in ... using vba to update record in another table - microsoft.public ...I am new to VBA, but here is what i want to accomplish. I have 1 form and 2 tables. Form uses table 1 to store data (first,last,address,tel.site (a),... Eraserve AP - Update a Field using VBA For MS AccessThe Actual VBA Code to Update a Field within a Table, you should be ... Field with a given strValue where another ... The sample includes 100 records in ... Update table from form using vba - PC Review - Computer News and ...... which nees to update a table however I need to complete the coding in VBA ... then we need to records to be entered into > the table ... Get data from a table, Update another ... Update an MS Access Table Field using VBAVisual Basic for Applications (VBA) ... to update a numeric field in a table I have when the VBA ... need VBA, you can open a recordset object, find the record ... How to: Insert, Update, and Delete Records From a Table Using ...VBA ... When you are inserting records from another table ... To update all the records in a table, specify the table name, and then use the SET clause to ... 7/19/2012 7:19:09 PM
|