Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable append query with a check box

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi,
On a form I have 4 check boxes, Wk1, Wk2, Wk3, Wk4.These chk boxes are used to select certain data to append to a tble(either true / false)
On the after update I want to either disable an append query or enable it.

I have 4 apppend querys, QWk1, QWk2, QW3, QW4.

What I would like to do is to be able when Wk1 is (True) to be able to enable QWk1 and when Wk1 = false then the append query QWk1 is disabled.
I'm not sure how to do this.

many thanks

Kp
 
I dont understand what you want
Try
adding a where condition to then query
Code:
Where forms!formname!wk[b]x[/b]=true
 
How are ya techkenny1 . . .

If I'm right, you want to synchronize the running of insert queries [blue]QWkN[/blue] with [blue]WkN[/blue] if [blue]WkN[/blue] is [blue]True[/blue]. The following should do:
Code:
[blue]   Dim x As Integer, CWk As String, QWk As String
   
   For x = 1 To 4
      CWk = "Wk" & CStr(x)
      QWk = "QWk" & CStr(x)
      If Me(CWk) Then DoCmd.OpenQuery QWk, acViewNormal
   Next
      
   Me.Requery 'Show the update in the form[/blue]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Hi The Aceman1
Many thanks for your reply.

This Db we inherited has a planner for staff. This planner inputs data by day. So if a staff memember has a job and it is repeated on that day and time for every monday in the month, I thought that the best option would be to have an append query which would have a date selection and time selction so that the append query could then update the planner table by date and time.

At present if a employee puts in their availablity sheet, every day and time slot has to be enetred individually.
I just wanted to make this easier to copy repetative data'

The planner has a chk box for every time slot which is in half hr increments. So if you select a time slot on a specific day, say today Thursday you can check the time slots. The query would then update the append query on what is "true" scroll to the next monday or it can use a date range and then append the data using the same criteria to insert that data into the planner table.

In this way without to many changes the user can copy data from, one day to the next by a command button.

So i nthe above info i thought that if a user wanted to just select a cetain week to update that that might be an easy solution, unless there is a better way

KP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top