Question Push Button to increment, will add one to category

Okay, there it is

Sorry about that

have you found a solution to your problem yet? i downloaded your database but could not find any buttons that you may have added to do this count, and could not find any code that looked like any in discussed in this thread to date...
 
I have not got a solution, if you downloaded all I have in the db, the queries and the forms is all I have.
It works now by just selecting Y/N, and it monitors which date it is. You can select all the categories at once or one of them. It works but wont allow me to make a report that totals the calls by category by month and reports it in the report.

I thought making a button to be the easiest to have for the users, could be multiple users, so it may not be possible, but I still need the report if not the buttons
 
I have not got a solution, if you downloaded all I have in the db, the queries and the forms is all I have.
It works now by just selecting Y/N, and it monitors which date it is. You can select all the categories at once or one of them. It works but wont allow me to make a report that totals the calls by category by month and reports it in the report.

I thought making a button to be the easiest to have for the users, could be multiple users, so it may not be possible, but I still need the report if not the buttons

ok, i've had another look at your database. i'm afraid i can't help. either:

it's such a mess i have no idea how you are currently going to add any useful features or user-friendly interface

or

it's waaaaay to advanced for my expertise.

i personally think it's the former - you have a lot of work to do on that database my friend. i suggest you rethink your approach. these are a few of the reasons i think you will constantly have trouble try to make your current setup working:

for starters, you tables look de-normalised and nomenclature all over the place (tables are conventionally prefixed with "tbl", forms with "frm", queries with "qry", etc) - why don't you use your PhoneCategory table in your form using a multiselect listbox or a subform, instead of using checkboxes? that way, if any new categories are added, you don't have to re-code anything in the form/module, it's just "there" for the users.

your combobox for Users uses a value lists - you should instead have a table tblUsers and use that (or a query of the table - makes it more flexible, e.g., you can filter out ex-employees) as the combo's row source.
you have the same code repeated in several places rather than just referring to it from one place

you're best off using Now() or Date() as the default value for CallDate - then the user can put their phonecall in 'real-time' without having to remember what the date is or remember to change it everyday, or accidentally putting in the wrong date or with the wrong format.

so as you can see, there's lots of ways to improve your design. start off by reading about normalisation. to start you off, i would suggest at least these tables:

tblCalls
-------------
CallID (PK, Autonumber)
CallDate
UserID (FK, Number) - see tlkpUsers

tblCallDetails
-------------
DetailsID (PK, Autonumber)
CallID (FK, Nnmber)
CategoryID (FK, Number)

tlkpUsers
-------------
UserID (PK, Autonumber)
UserCode (Text)
UserName (Text)

tlkpPhoneCategory
-------------
CategoryID (PK, autonumber)
Category (Text)

search the forum for other people creating telecommunications databases (there have been HEAPS), and here's some detailed descriptions of normalisation, but you should do a lot of your own reading in addition to these:

http://www.access-programmers.co.uk/forums/showpost.php?p=839040&postcount=13

http://www.access-programmers.co.uk/forums/showthread.php?p=913461#post913461

i know it's a lot of work, but believe me - as someone who also started with really bad database design - it's worth it in the long run (and short run, as it happens).
 
Thanks for input, I totally agree that the db is very poorly put together, it's just a table, put together in a hurry, thats why the naming functions were not followed as well and the combo box was a last minute change.

I will take your valued experience and use it, thanks.
Once put together I hope you can help me with the final product.
 
Okay, we must have a communication problem going on, so I'll have to restate it.

Do not post an Excel file, Do not post an XML file.

POST THE ACTUAL DATABASE FILE (the mdb or accdb file).

i see a little irony in this thread, being a communications database and all. in the nicest way, naturally :)

NS
 
Thanks for input, I totally agree that the db is very poorly put together, it's just a table, put together in a hurry, thats why the naming functions were not followed as well and the combo box was a last minute change.

I will take your valued experience and use it, thanks.
Once put together I hope you can help me with the final product.

i definitely speak from experience - my first database was a massive mess and REALLY hard to maintain. i took the time to normalise the tables and create a few combos, etc, and all of a sudden the database practically maintained itself ;)
 
boblarson, I have same request, only need the time to increment in .25 hours. The code works great for 1 hour increments, but ignores any decimal. I modified your code
Me.textBox83.Value = Nz(Me.textBox83.Value,0) + 1
to
Me.textBox83.Value = Nz(Me.textBox83.Value,0) + 0.25
Thanks for any further direction you can provide!
 
boblarson, I have same request, only need the time to increment in .25 hours. The code works great for 1 hour increments, but ignores any decimal. I modified your code
Me.textBox83.Value = Nz(Me.textBox83.Value,0) + 1
to
Me.textBox83.Value = Nz(Me.textBox83.Value,0) + 0.25
Thanks for any further direction you can provide!

Does it work with:

Code:
[COLOR=black]Me.[/COLOR]textBox83.Value = [COLOR=red][B]DateAdd("n", 15, [/B][/COLOR][COLOR=red][COLOR=black]Nz(Me[/COLOR][/COLOR][COLOR=black].[/COLOR]textBox83.Value[COLOR=black],0)[/COLOR][COLOR=red][B])[/B][/COLOR]

Also, remember that the datatype can't be set to an integer type or it will strip any decimal values off.
 
Sorry, that doesn't work either. I understand what you mean about the datatype. I've tried setting the text box to fixed or standard, with 2 decimal places, but it doesn't register any increments.

I reset the field size in the table for this field to double. That allows the code to work, but it's only incrementing by .01
 
Last edited:
That allows the code to work, but it's only incrementing by .01

Yes, .01 is 14 minutes and 24 seconds. It needs more decimal places to be 15 minutes exactly (.01042 to be exact). Date/Time fields are really stored as Doubles and it uses the left side of the decimal for the days and the right side of the decimals is the time.
 
I think I went down the wrong rabbit hole in my original question. I'm happy to have the number increment in .25 jumps. It doesn't have to be an actual TIME measurement. This is just to record how much time the user spent on resolving an issue. The text box is labeled "Time Spent" so it should be evident what's being captured on the record - quarter of an hour, an hour, two-and-a-half hours, etc. Sorry I wasn't more clear and I appreciate your efforts!
 
Last edited:
Hello, I am new to the forums and I have a similar question.
I am making a sports statistics database. My client requires me to create a live game time data entry method. To do this, I need to list everyone's name, and have buttons next to their names to increment the appropriate field. I have tried
Private Sum Command6_Click()
Me.GP.Value = Nz(Me.GP.Value, 0) + 1
End Sub,
But on click get the error, Run time error '2448' You can't assign a value to this object.
Please note, I am currently in a report, as it was the only way I could think to list all the names.
Please let me know what I am doing wrong.
 
Hello, I am new to the forums and I have a similar question.
I am making a sports statistics database. My client requires me to create a live game time data entry method. To do this, I need to list everyone's name, and have buttons next to their names to increment the appropriate field. I have tried
Private Sum Command6_Click()
Me.GP.Value = Nz(Me.GP.Value, 0) + 1
End Sub,
But on click get the error, Run time error '2448' You can't assign a value to this object.
Please note, I am currently in a report, as it was the only way I could think to list all the names.
Please let me know what I am doing wrong.

can't help you with the incrementation, but you can list all players names in a continuous form (or a subform in datasheet view). setup should be similar to your report.
 
My apologies, did not mean to post twice, must have had too many tabs open, did not realize which forum post was on.
Josh
 
could you not just use an update query. im not how to type the criteria in the query for your increment but i have just done this for field x to change from 1 to 2 on the click of a button.
 
could you not just use an update query. im not how to type the criteria in the query for your increment but i have just done this for field x to change from 1 to 2 on the click of a button.
shutzy, follow up answers should go in joxmaro's own thread, i.e. in the link I posted above.
 
sorry wasnt sure if this thread was continuing after you had pointed that out.
 
Me.Text0.Value = Nz(Me.Text0.Value, 0) + 1
This works absolutely great but how does one create a records of each number generated in a table.

Thanks,
Tedward
 

Users who are viewing this thread

Back
Top Bottom