Ugh... [sadeyes]
That will teach me to question something without trying the solution first!!
PH, your sample works perfectly! [thumbsup2]
Thank you!
- Turb
I have the following table (Table1) in an Access 2003 database:
PART# WHLOC #LOCS
PART1 R1SH2
PART2 R3SH1
PART2 R1SH4
PART3 R4SH3
I need to run a query to populate the '#LOCS' field for each record with a number that indicates how many locations each part resides in...
SkipVought,
That was the key!
Once I set the format of the text box controls (all of those involved) to 'General Number' and saved the form, it all worked fine.
My thanks, to both of you, for all your help!
- Turb
straybullet, thank you for your help!
But for some reason, this is returning some strange numbers for me.
I created the module exactly as Allen Browne suggests (I made no changes):
Function MinOfList(ParamArray varValues()) As Variant
Dim i As Integer 'Loop controller.
Dim varMin...
I have been researching and testing and still cannot seem to figure this one out...
I have to convert this Excel formula to work in an Access form:
=(MAX(D1:D6)-MIN(D1:D6))/(MAX(D1:D6)+MIN(D1:D6))*100
My form's unbound text box controls:
D1, D2, D3, D4, D5, D6
Formula would be entered as...
PHV,
Thank you for your post!
This works beautifully! Thank you.
But... it issues no message for the halt.
Is there a way to do something like this, but have it pop up the message box from the Public Function when there is no entry?
- Turb
Shoot!
I've just realised that although I have solved the original problem (duplicate serial number on the form as in the table allowing the print function even though the save function fails), I have created another like it (NO serial number on the form is allowing the print function with no...
randy700,
Thank you for your post!
Your post actually fixed the issue and the code now works for me (since my serial numbers are alpha-numeric), but I think I'll have to give the star to MajP this time; it was his code and he took the time to work with me through this from the very beginning (I...
MajP,
Ok, I've pasted this into the Form's Class Module
Public Function isDuplicate() As Boolean
Dim strWhere As String
strWhere = " SERIALNUMBER = " & Me.SERIALNUMBER & ""
Debug.Print strWhere
If DCount("SERIALNUMBER", "TestTable", strWhere) > 0 Then
MsgBox "Record already Exists"...
MajP,
Um... as I said, it's been awhile... where does this go? In a new database module or in a class module for the form?
Public function isDuplicate () as boolean
dim strWhere as string
strWhere = " someNumericField = " & Me.someControl & " AND someOthertextField = '" &...
MajP,
Thank you for your quick response.
No, I don't get any error message on failure of the BackUpQuery function; the EventProcedure keeps right on running and the printout runs.
It never occured to me to first check for a dupicate...
I'll give your suggestion a try and post back.
Thanks...
Hi all!
I've been away from Access for a long while now, so please bear with me.
I've been searching the FAQ's and threads but cannot seem to find this answer; please pardon me if this has been answered elsewhere and feel free to point me to the correct thread.
I am using this code on an Access...
Ok, here's what works so far:
1. Created a make table query (based on the original select query) to make the temp table and once it was created I then changed it to an append query to append to the temp table; this gets me the data I need.
2. Created a macro (OpenForm) to run:
SetWarnings...
Duane,
Ok.
Thanks for your input.
So far, I looks like I will have to make some changes on this form to get what I need.
I can make my form's underlying query an 'append' query (copy the existing and change it's type to 'append' - after I first make the 'temp' table), to append to the 'temp'...
Duane,
Actually, no.
I want to populate text fields on a form based on the data selected by the user (one record of many) from the combo box.
Well, since I cannot seem to get the combo box to show more than one record from a select query under a form...
- Turb
dhookum, thank you for the clarification.
Maybe I should approach this from another angle...
If I cannot get a combo box to allow me to select more than a single record from a query, even if that query has multiple records in it when run, maybe I can populate the form fields (the bound ones...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.