1 Replies - 1306 Views - Last Post: 10 March 2012 - 01:21 AM

#1 roguex20  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 35
  • Joined: 11-August 11

Set Value from Value produced from Code

Posted 09 March 2012 - 06:18 PM

I thought I was almost done with my project, but apparently not. This is probably my last stab as this, then I am going to try it in SQL and C#. I am still a newb to C# but I've done enough where I am confident I can pull this off in C# and SQL.

Well I have a list of customers who have multiple orderIDs. I have two tables joined on the account number. I am trying to create a mailing. For each customer his/her orderIDs will show up in the mailing. I created code that places the orderIDs into a string that I wanted to place into a field. I am stuck at setting the value in the field in any of the tables.

I've tried using the macro, tried with code etc...

Can someone point me in the right direction? Going to take a long walk as I thought this would be simple, but my lack of knowledge on Access is obviously bigger than I thought.

This post has been edited by roguex20: 09 March 2012 - 06:19 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Set Value from Value produced from Code

#2 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: Set Value from Value produced from Code

Posted 10 March 2012 - 01:21 AM

Don't understand why you need to put calculated value in table. Make the code a function and call the function from a query. Use query as data source for the mailing. If you do have a field in table and really want to populate it (not recommended), use an SQL update action statement.

Sounds like your code is concatenating data from related records. Might compare your code with this http://allenbrowne.c...unc-concat.html

This post has been edited by June7: 10 March 2012 - 01:24 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1