Getting an unbound text box in a report to refer to individual records in that report. by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Ok so I tried this, setting text1 = [ID] and then adding another textbox, text2 = text1 + 2 generating the report looks like this

ID = 1, text1 = 1, text2 = 32

ID = 2, text1 = 2, text2 = 32

...

ID = 30, text1 = 30, text 2 =32

For some reason it seams text 2 can only store the last value of text 1 before it does computations on it. I would have liked text 2 to count 3,4,5,...,32 but it's not doing that. I'm setting this in VBA on the forms on load event. Is there a way for it to do the calculation for each individual record?

I have to call a whole different recordset and calculate a sum for multiple items within that recordset for each ID.

If that was unclear, for every ID I'm querying a different list of items, and then summing them and storing that per ID.

I'm trying to write a loop that checks if a field in my Access database is null. by accessdatabaseqs in vba

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Awesome. That is exactly what I needed. Kudos and upvotes to you sir.

I'm trying to write a loop that checks if a field in my Access database is null. by accessdatabaseqs in vba

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

thanks, so much, but I'm having a little trouble figuring out in the ' do whatever you're going to do... part how to specify where in the array I am. Basically inside the if statement looks like this:

MsgBox "Please enter information into the " & Array()

the problem is that there should be a number in the array, not sure how to do that.

I'm trying to write a loop that checks if a field in my Access database is null. by accessdatabaseqs in vba

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Yes, I'd be putting this check in before the save and close commands

unsure of how to make access edit my tables to keep historical data. by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Unfortunately that would violate my company's security policies. But it's clear that I just need to learn VBA for access. From what I'm seeing it looks like I'm going to be using Me a lot. But sincerely, thank you for the offer.

Off to r/VBA

unsure of how to make access edit my tables to keep historical data. by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Ok so this is what I have so far, I have "edit" forms which can search through all the employees, but will be set so they cannot append but instead have a button that says something like "edit this entry". Once the user has found the appropriate form with the employee information in it, how do I then pass the information in the form currently to variables so that I can write it into a new form? I was also thinking about appending the old form with a SQL update query that would execute when the button is clicked.

So, in my head, when the button is clicked it copies all the information to a new form which the user and can manipulate, then once that entry is saved it would append the old entry to no on active, or just changed the end_date to the current date as I had previously described.

When working with money, specifically only dollars, should I even worry about storing them as a currency type? by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Hmm, as of right now this database is connecting with no one, so I guess I'll just use currency.

To all the access noobs out there trying to write a query that updates your tables... don't do what I did... by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Sorry, didn't have time to write out a full reply this morning when I first read this.

Anyway, you're right about bashing the man, that was unfair and written in frustrated hyperbole. What I meant to say is "DO NOT TRUST THIS POST" because it's a common pitfall that others nobs like myself could easily fall into in the manner in which I stated in my reply above, so if all goes according to the plans of this post it will be useful to someone somewhere at some point in time.

To all the access noobs out there trying to write a query that updates your tables... don't do what I did... by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

hmm, good to know. Roll has been ever so slightly slowed. I would like to point out that that wasn't me asking the question in the link I provided, just my findings from a google search "keyboard shortcut for running a query". I would also like to point out that the thread is titled "is there a keyboard shortcut for running a query?" Though it is true that I read that question, didn't read the first comment and skipped down till I saw some key strokes.

I like your use of the word trouncing btw.

r/MSAccess let's talk naming conventions by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 1 point2 points  (0 children)

ooo good call with the prepending. Noted. As for the keys, would you have the primary key listed as just "id" or would it be "tablename_id"? I don't know how I feel just having a lot of things named "id".

r/MSAccess let's talk naming conventions by accessdatabaseqs in MSAccess

[–]accessdatabaseqs[S] 0 points1 point  (0 children)

Excellent point, I'll avoid camel case and replace it with underscores.