PC Review


Reply
Thread Tools Rate Thread

Autofill and modify data in Access

 
 
Mary Hartman
Guest
Posts: n/a
 
      9th Dec 2006

I could do this if I were programming in basic, but I'm not sure it
can be done for Access. I have built a database driven website using
Access. Each item has a number of jpgs for display. The names of
these are built off the stock number. For example:

Stocknumber: 1234
1st Jpg: 1234.jpg
2nd jpg: 1234a.jpg
3rd jpg: 1234b.jpg
etc.

Is it possible to create a routine in Access that if the stock number
is entered "1234" it will automatically append the endings and then
fill in all the Picture_name_fields.

There are about 15,000 items that need to be put into the database,
some with as many as 6 pictures, so any automation would help a lot.
Of course I'd have to tell the database how many pictures that
particular item had first: only 1 or as many as 6.

I know this isn't an easy one. Thank you anyone who can help at all.

 
Reply With Quote
 
 
 
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      9th Dec 2006
Program it in Basic and put it in a standard module in Access. Then call it
in a query or from a command button. Code in VBA is almost bit for bit the
same as code in Visual Basic (6.0 not .net) I haven't done exactly what you
want but here's something that is along a similar method.:

http://www.datastrat.com/Download/AlphaNumeric2K.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Mary Hartman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> I could do this if I were programming in basic, but I'm not sure it
> can be done for Access. I have built a database driven website using
> Access. Each item has a number of jpgs for display. The names of
> these are built off the stock number. For example:
>
> Stocknumber: 1234
> 1st Jpg: 1234.jpg
> 2nd jpg: 1234a.jpg
> 3rd jpg: 1234b.jpg
> etc.
>
> Is it possible to create a routine in Access that if the stock number
> is entered "1234" it will automatically append the endings and then
> fill in all the Picture_name_fields.
>
> There are about 15,000 items that need to be put into the database,
> some with as many as 6 pictures, so any automation would help a lot.
> Of course I'd have to tell the database how many pictures that
> particular item had first: only 1 or as many as 6.
>
> I know this isn't an easy one. Thank you anyone who can help at all.
>



 
Reply With Quote
 
Mary Hartman
Guest
Posts: n/a
 
      9th Dec 2006
Okay, I'll try writing a basic routine and plugging it into maybe an
after-update section. Click on if there is a picture or not and if
yes than append "a.jpg" or "b.jpg" and fill the field.

I am not quite sure how to ID the correct Access field in basic.
Should I use form ID or Table ID?



On Fri, 8 Dec 2006 21:28:12 -0500, "Arvin Meyer [MVP]" <(E-Mail Removed)>
wrote:

>Program it in Basic and put it in a standard module in Access. Then call it
>in a query or from a command button. Code in VBA is almost bit for bit the
>same as code in Visual Basic (6.0 not .net) I haven't done exactly what you
>want but here's something that is along a similar method.:
>
>http://www.datastrat.com/Download/AlphaNumeric2K.zip


 
Reply With Quote
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      9th Dec 2006
You'd use the name of a control, like a textbox, or a command button, not a
field to run your code. I would look at the ANSI value, so for instance
lookup (or use a recordset, it's faster) the record for 1234c.jpg (i.e. that
last existing record for 1234). Then strip off the .jpg and parse the c to
find the next charcter to use. lower case c = Chr(99), so the next name
would be: "1234" & Chr(100) & ".jpg"
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Mary Hartman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Okay, I'll try writing a basic routine and plugging it into maybe an
> after-update section. Click on if there is a picture or not and if
> yes than append "a.jpg" or "b.jpg" and fill the field.
>
> I am not quite sure how to ID the correct Access field in basic.
> Should I use form ID or Table ID?
>
>
>
> On Fri, 8 Dec 2006 21:28:12 -0500, "Arvin Meyer [MVP]" <(E-Mail Removed)>
> wrote:
>
>>Program it in Basic and put it in a standard module in Access. Then call
>>it
>>in a query or from a command button. Code in VBA is almost bit for bit the
>>same as code in Visual Basic (6.0 not .net) I haven't done exactly what
>>you
>>want but here's something that is along a similar method.:
>>
>>http://www.datastrat.com/Download/AlphaNumeric2K.zip

>



 
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
MS Access: Autofill Textbox Data In Form will not Save Data To Table adidashawn6 General Software 0 4th Jan 2011 04:47 PM
Using a Vb 2005 form, to modify/access data in MS Access 2003 Boogie Microsoft VB .NET 3 28th Jan 2007 03:32 PM
modify Autofill in e-mail address =?Utf-8?B?Q2h1Y2tX?= Microsoft Outlook Discussion 2 19th Jul 2005 04:11 PM
I can't modify data in Access? =?Utf-8?B?cmVkd2lsYmVy?= Microsoft Access Forms 0 21st Sep 2004 05:45 PM
access, ComboBox and modify data Gianluca_Venezia Microsoft Access Form Coding 2 10th Jul 2003 01:00 PM


Features
 

Advertising
 

Newsgroups
 


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