sub form/report problem

Toadums

Registered User.
Local time
Today, 08:32
Joined
Feb 22, 2009
Messages
53
Hey, So I have a form that I would like to tack onto the top of a report that I have...it looks good, just a few problems.

1) (most important) i lose the functionality of the form...the code for the form looks like this:

Code:
Option Compare Database

Private Sub Command2_Click()

Dim criteria As String

criteria = ""



   If IsNull(Me.Text_Name.Column(1)) Or (Me.Text_Name.Column(1) = "") Then
        
        
        criteria = "ProjectID = '" & Me.Text_ProjID.Column(0) & "'"

        
        
    ElseIf IsNull(Me.Text_ProjID) Then

        criteria = "Name = '" & Me.Text_Name.Column(1) & "'"
        
    ElseIf Not IsNull(Me.Text_ProjID) And Not IsNull(Me.Text_Name) Then
        
        criteria = "Name = '" & Me.Text_Name.Column(1) & "' AND ProjectID = '" & Me.Text_ProjID.Column(0) & "'"
        
    End If

        DoCmd.OpenReport "rptsql", acViewReport, , criteria

End Sub
so, when the button is clicked, the report queries...it works, EXCEPT you cant change the value of the comboboxes...you can see all the options.....but you just cant click any..anyone know what that may be all about?

2) the sub form (i added the form to the report) has an ugly border around that I wouldnt mind getting rid of...I want it to look like it is one form...not sub forms...ya know what I mean?

here is a screen of what I am looking at (note: the report isnt formatted in the slightest)

thanks! if you need more details just leave a q

report.bmp
 
Check the properties of the subform control. Makes sure it is Enabled and Not Locked
Check the properties of the form object. Allow Edits must be set to Yes.

The annoying borders can also be switched off in the form object properties.
Navigation Buttons, Record Selectors and Border Style properties.
 
thanks! hehe, got half of it working :D. hid all the ugly crap around the sides

but i still cant change comboboxes (i added a textbox just for testing purposes, and it wont let me enter ANY text into it)...i checked all the properties a few times, and they all seem to be good (none jumped out at me as what should make the form uneditable)...checked the ones you told me too...they are all good

any more ideas..?
 
Are the controls bound to the record source of the form?
If so perhaps the record set is not updateable. Record Source queries incorporating some joins and any Totals query are not updatebale.
 
still not working ugh >.< might try remaking the form with different settings when i get home
 
Hi.
You could try this:
Open properties window for "FORM"
In DATA tab, set "Recordset Type" property to "Dynaset (Inconsistent updates)"
I hope this will help.
Have a nice day!
 
nope, sorry :(

but it is ok, the way I have it set up, you look at the form only, and then when you click the button, it will just open the report in a new tab...good enough :)

thanks everyone for trying tho!!
 

Users who are viewing this thread

Back
Top Bottom