User Profile
Collapse
-
Thanks A, I'll have a look at the properties, then contact you. :-) -
Thanks for the quick response. Can you please ignore the fact that I have 491 posts on this site and pretend that I am the newbiest of all newbs?
I'm not even sure where to begin creating an update query.Leave a comment:
-
Subform datasheet: select one record to update form?
Hello all,
I have a form with a subform in datasheet view. The subform shows name and phone number and a checkbox that says "use this contact". When selected, the name and number populate text fields on the main form.
The problem is that if the subform contains multiple records, the checkbox for each can be selected. The form holds the values of the last selected, but I'd like for there to be only one check -... -
More info.
tbl_Artifact.su rvey_id = tbl_SURVEY.surv ey_id.
So every record in the Artifact table is linked to a survey_id but not every survey is linked to an Artifact.Leave a comment:
-
hide subreport if no data
I have a report of survey areas. Some of the survey areas have cultural artifacts, some don't. I need to show all survey areas whether they have artifacts or not. However, I only want to show data about the artifacts if they exist.
Main report = survey areas
Subreport = artifacts
I'd like the subreport not to show up if there aren't artifacts in a survey area. Right now I see empty fields and headings.
... -
Got it. Had to set focus to a field on the main form first, then requery.Leave a comment:
-
Okay, so here is what I came up with. This is on the main form and will delete a grandchild, a child, and the parent (that sounds so morbid).
Code:Private Sub cmdDelete_Click() On Error GoTo Err_cmdDelete_Click Dim strSQL As String DoCmd.SetWarnings (False) If MsgBox("You are about to delete a daily progress report dated " & Me.dpr_date & " and all its associated survey areas
Leave a comment:
-
Thanks I'll look into it. So do you think that if I set those relationships through MySQL that the code I have above will work? Or does it need to be augmented?Leave a comment:
-
phpmyadmin was used to create the tables initially. In Access I used the relationship diagrammer to simply set connections between tables but the cascading options are greyed out. I'm not familiar enough with phpmyadmin or MySQL to define those relationships. Is there a better interface (has to be free, too) to do that in?Leave a comment:
-
I'm fairly new to MySQL. How do you set up cascading? I noticed that option was not available on the Access side of the relationship builder.
Thanks again for your help. :-)Leave a comment:
-
AccessIdiot started a topic how to ensure delete child records with MySQL back end Access front end?in Accesshow to ensure delete child records with MySQL back end Access front end?
Back with another question.
I have a form with a subform that also has a subform. Tables in MySQL:
dpr = dpr_id (pk), etc.
dpr_survey = survey_id (pk), dpr_id, etc.
dpr_cr = cr_id (pk), survey_id, etc.
On each of the three forms is a delete button to delete the current record. It works well for the parent record but not the child record(s). I have relationships set up for dpr_survey and dpr_cr... -
Default is 0 so shouldn't be a problem with the null (and I can use NZ right?). Thanks for the shortcut tip!Leave a comment:
-
Well, I guess I'm going to have to chalk it up to being corrupted. :-( Very frustrating. But on to other things!
Like, why am I still getting a value of -1 when the box is checked instead of the value changing to 1?Leave a comment:
-
"Something else puzzles me.
How come you use
If chkWork.Value = True Then
as opposed to
If Me.chkWork.Valu e = True Then"
Heh - because I'm a hack coder who doesn't know what she is doing. :-) I'm actually a GIS Specialist trying to make some database things work. If I can get this up and running I can join it to some spatial data and impress my boss.
If I am referencing a field in the...Leave a comment:
-
So if I'm not creating a new variable to hold anything, but just specifying an actual field in the database that I want populated, it shouldn't matter if I use Option Explicit or not right? The fact that Me. shows ALL my fields EXCEPT that one is raising a red flag for me. Especially when the database is copied and moved and then shows up in that copy? That sounds like something is corrupted in the original version of the db?Leave a comment:
-
I do have Option Explicit, yes. No, I did not dim any of the variables. I've done a few access projects, though I am very much a beginner, and I can't recall ever declaring field names, and yet things work. So I am obviously practicing some very bad programming!
So since it all worked great until I tried to add this one particular bit of code is Access just very forgiving up to a point and then yells at me? Do I need to declare all fields...Leave a comment:
-
Yes and yes, although is a field name a variable? I haven't declared anything anywhere and yet all the others work? dpr_vehicle, dpr_safety, and dpr_work are all tiny int fields in the MySQL db. The code for dpr_vehicle and dpr_safety work just fine.
One of my coworkers made a copy of the database and opened it on his machine and was able to get it to work with no problem. So we've replaced the file, but I still find it to be very s...Leave a comment:
-
If I create a blank form and add a checkbox, set the control source to the field in question, then go into the VBA editor it shows up? and works? So something is explicitly in my form that prevents it from working?Leave a comment:
-
variable not defined error for field that exists?
I am using a MySQL back end and Access front end. One of my MySQL tables has three fields all defined as tiny ints, no nulls, default 0, field width 2.
On my form I have three checkboxes, each linked to the three fields. I have the EXACT SAME CODE for each after update:
Code:Private Sub chkJHA_AfterUpdate() If chkJHA.Value = True Then dpr_safety = 1 Else dpr_safety = 0 End If End
-
Thanks for the reply - what I did seems to work but if it barks at me again I'll hit you up for a further explanation of your suggestion. :-)Leave a comment:
No activity results to display
Show More
Leave a comment: